* Segmentation fault while dynamic linking
@ 2001-06-26 9:32 Michael Habermann
2001-06-26 17:12 ` Matthew Locke
0 siblings, 1 reply; 9+ messages in thread
From: Michael Habermann @ 2001-06-26 9:32 UTC (permalink / raw)
To: linuxppc-embedded
The simple program below produces a segmentation fault when dynamically
linked. When linked with '--static', it works fine.
What can be the problem?
The Segmentation Fault occurs at a lot of programs like busyboxes 'ls' and
unfortnately also at gdbserver.
My configuration: Kernel 2.4.4, glibc 2.2.2, bash 2.05, FADS, MPC855T
#include <stdio.h>
#include <time.h>
int main(int argc, char** argv){
time_t tm;
time(&tm);
printf("This line is displayed\n");
localtime(&tm); //produces Segmentation fault
printf("This one not\n");
return 0;
}
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-26 9:32 Segmentation fault while dynamic linking Michael Habermann
@ 2001-06-26 17:12 ` Matthew Locke
2001-06-27 1:17 ` Michael Habermann
0 siblings, 1 reply; 9+ messages in thread
From: Matthew Locke @ 2001-06-26 17:12 UTC (permalink / raw)
To: Michael Habermann; +Cc: linuxppc-embedded
Michael Habermann wrote:
> My configuration: Kernel 2.4.4, glibc 2.2.2, bash 2.05, FADS, MPC855T
who's toolchain are you using? glibc 2.2.x has a cacheline size bug for
the smaller cacheline ppc processors. Our toolchain has a fix for it.
grab our HHL 2.0 Journeyman edition and give it a try.
http://www.mvista.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-26 17:12 ` Matthew Locke
@ 2001-06-27 1:17 ` Michael Habermann
2001-06-27 3:26 ` Matthew Locke
0 siblings, 1 reply; 9+ messages in thread
From: Michael Habermann @ 2001-06-27 1:17 UTC (permalink / raw)
To: Matthew Locke; +Cc: linuxppc-embedded
At 10:12 AM 6/26/2001 -0700, Matthew Locke wrote:
>>My configuration: Kernel 2.4.4, glibc 2.2.2, bash 2.05, FADS, MPC855T
>
>who's toolchain are you using? glibc 2.2.x has a cacheline size bug for
>the smaller cacheline ppc processors. Our toolchain has a fix for it.
>grab our HHL 2.0 Journeyman edition and give it a try. http://www.mvista.com
binutils 2.11.2
gcc 2.95.3
glibc 2.2.2
Everything unpatched and downloaded from ftp.gnu.org.
I've read in the mailing list, that the glibc needs to be patched. But I've
found that the most changes are already made at glibc2.2.2, so I assumed it
should work.
The kernel is 2.4.4 from ftp.denx.de, patched by a patch posted from Dave
Ellis.
Ok, I try the mvista glibc.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-27 1:17 ` Michael Habermann
@ 2001-06-27 3:26 ` Matthew Locke
2001-06-27 11:42 ` Michael Habermann
0 siblings, 1 reply; 9+ messages in thread
From: Matthew Locke @ 2001-06-27 3:26 UTC (permalink / raw)
To: Michael Habermann; +Cc: linuxppc-embedded
Michael Habermann wrote:
> At 10:12 AM 6/26/2001 -0700, Matthew Locke wrote:
>
>>> My configuration: Kernel 2.4.4, glibc 2.2.2, bash 2.05, FADS, MPC855T
>>
>>
>> who's toolchain are you using? glibc 2.2.x has a cacheline size bug
>> for the smaller cacheline ppc processors. Our toolchain has a fix for
>> it. grab our HHL 2.0 Journeyman edition and give it a try.
>> http://www.mvista.com
>
>
> binutils 2.11.2
> gcc 2.95.3
> glibc 2.2.2
>
> Everything unpatched and downloaded from ftp.gnu.org.
yeah, sounds like the cacheline problem. It is still in glibc 2.2.2 and
2.2.3.
>
> I've read in the mailing list, that the glibc needs to be patched. But
> I've found that the most changes are already made at glibc2.2.2, so I
> assumed it should work.
>
> The kernel is 2.4.4 from ftp.denx.de, patched by a patch posted from
> Dave Ellis.
>
> Ok, I try the mvista glibc.
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-27 3:26 ` Matthew Locke
@ 2001-06-27 11:42 ` Michael Habermann
2001-06-27 17:08 ` Matthew Locke
0 siblings, 1 reply; 9+ messages in thread
From: Michael Habermann @ 2001-06-27 11:42 UTC (permalink / raw)
To: Matthew Locke; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]
> >>> My configuration: Kernel 2.4.4, glibc 2.2.2, bash 2.05, FADS, MPC855T
> >>
...
> > binutils 2.11.2
> > gcc 2.95.3
> > glibc 2.2.2
> >
> > Everything unpatched and downloaded from ftp.gnu.org.
>
>
> yeah, sounds like the cacheline problem. It is still in glibc 2.2.2 and
> 2.2.3.
>From what I read in the mailing list, I would also say it looks like this
problem.
I've recompiled my toolchain now with plain gnu software and the following
patches
from ftp.mvista.com and glibc-src package:
glibc22-27.patch glibc22-getaddrinfo.dpatch
glibc22-disable-static.dpatch glibc22-nss-upgrade.dpatch
glibc22-eo_EO.dpatch glibcbug.dpatch
But the problem is still there.
I couldn't find 'the cacheline patch'. Is it the one mentioned here:
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200003/msg00073.html
It contains for example this lines:
--- dl-machine.c.ORIG Fri Mar 5 00:26:43 1999
+++ dl-machine.c Sat Nov 6 14:33:47 1999
@@ -250,7 +250,11 @@
PowerPC processors have line sizes of exactly 32 bytes. */
size_modified = lazy ? rel_offset_words :
PLT_INITIAL_ENTRY_WORDS;
+#ifdef PPC_CACHELINESIZE_32
for (i = 0; i < size_modified; i+= 8)
+#else
+ for (i = 0; i < size_modified; i+= 4)
+#endif
But this increment is already at +4 in my nupatched glibc.
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
--
GMX Tipp:
Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a
[-- Attachment #2: " --]
[-- Type: application/octet-stream, Size: 82 bytes --]
"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="
"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-27 11:42 ` Michael Habermann
@ 2001-06-27 17:08 ` Matthew Locke
2001-06-28 2:57 ` Michael Habermann
0 siblings, 1 reply; 9+ messages in thread
From: Matthew Locke @ 2001-06-27 17:08 UTC (permalink / raw)
To: Michael Habermann; +Cc: linuxppc-embedded
Michael Habermann wrote:
>>>>>My configuration: Kernel 2.4.4, glibc 2.2.2, bash 2.05, FADS, MPC855T
>>>>>
> ...
>
>>>binutils 2.11.2
>>>gcc 2.95.3
>>>glibc 2.2.2
>>>
>>>Everything unpatched and downloaded from ftp.gnu.org.
>>>
>>
>>From what I read in the mailing list, I would also say it looks like this
> problem.
>
> I've recompiled my toolchain now with plain gnu software and the following
> patches
> from ftp.mvista.com and glibc-src package:
> glibc22-27.patch glibc22-getaddrinfo.dpatch
> glibc22-disable-static.dpatch glibc22-nss-upgrade.dpatch
> glibc22-eo_EO.dpatch glibcbug.dpatch
>
> But the problem is still there.
>
> I couldn't find 'the cacheline patch'. Is it the one mentioned here:
> http://lists.linuxppc.org/listarcs/linuxppc-embedded/200003/msg00073.html
>
There are two places cacheline size affects glibc. The one above that
you already found and in the glibc ppc optimized memset or memcpy (don't
remember which one). you can just delete the ppc specific memset and
configure will pull in the generic memset.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-27 17:08 ` Matthew Locke
@ 2001-06-28 2:57 ` Michael Habermann
2001-06-28 6:46 ` Justin (Gus) Hurwitz
0 siblings, 1 reply; 9+ messages in thread
From: Michael Habermann @ 2001-06-28 2:57 UTC (permalink / raw)
To: Matthew Locke; +Cc: linuxppc-embedded
At 10:08 AM 6/27/2001 -0700, Matthew Locke wrote:
>There are two places cacheline size affects glibc. The one above that
>you already found and in the glibc ppc optimized memset or memcpy (don't
>remember which one). you can just delete the ppc specific memset and
>configure will pull in the generic memset.
Yeah, deleting memset.S solved my problem.
Thanks to you and the guys who answered by private mail.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-28 2:57 ` Michael Habermann
@ 2001-06-28 6:46 ` Justin (Gus) Hurwitz
2001-06-28 16:20 ` Matthew Locke
0 siblings, 1 reply; 9+ messages in thread
From: Justin (Gus) Hurwitz @ 2001-06-28 6:46 UTC (permalink / raw)
To: Michael Habermann; +Cc: linuxppc-embedded
On Thu, 28 Jun 2001, Michael Habermann wrote:
>
> At 10:08 AM 6/27/2001 -0700, Matthew Locke wrote:
>
> >There are two places cacheline size affects glibc. The one above that
> >you already found and in the glibc ppc optimized memset or memcpy (don't
> >remember which one). you can just delete the ppc specific memset and
> >configure will pull in the generic memset.
>
> Yeah, deleting memset.S solved my problem.
>
> Thanks to you and the guys who answered by private mail.
Could you post a quick summary of what yo had to do to get this to work
(ie, which source you downloaded, which patches you downloaded and
applied, and which flags you used to compile)?
I've been trying to get uClibc to work, but am having IO errors with it,
so I'm thinking of giving glibc another try.
Thanks,
--Gus
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Segmentation fault while dynamic linking
2001-06-28 6:46 ` Justin (Gus) Hurwitz
@ 2001-06-28 16:20 ` Matthew Locke
0 siblings, 0 replies; 9+ messages in thread
From: Matthew Locke @ 2001-06-28 16:20 UTC (permalink / raw)
To: Justin (Gus) Hurwitz; +Cc: Michael Habermann, linuxppc-embedded
Justin (Gus) Hurwitz wrote:
> On Thu, 28 Jun 2001, Michael Habermann wrote:
>
>
>>At 10:08 AM 6/27/2001 -0700, Matthew Locke wrote:
>>
>>
>>>There are two places cacheline size affects glibc. The one above that
>>>you already found and in the glibc ppc optimized memset or memcpy (don't
>>>remember which one). you can just delete the ppc specific memset and
>>>configure will pull in the generic memset.
>>>
>>Yeah, deleting memset.S solved my problem.
>>
>>Thanks to you and the guys who answered by private mail.
>>
>
> Could you post a quick summary of what yo had to do to get this to work
> (ie, which source you downloaded, which patches you downloaded and
> applied, and which flags you used to compile)?
>
> I've been trying to get uClibc to work, but am having IO errors with it,
> so I'm thinking of giving glibc another try.
>
that is probably best:-) Just grab our toolchain it works and it has
the patches in its src rpm.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-06-28 16:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-26 9:32 Segmentation fault while dynamic linking Michael Habermann
2001-06-26 17:12 ` Matthew Locke
2001-06-27 1:17 ` Michael Habermann
2001-06-27 3:26 ` Matthew Locke
2001-06-27 11:42 ` Michael Habermann
2001-06-27 17:08 ` Matthew Locke
2001-06-28 2:57 ` Michael Habermann
2001-06-28 6:46 ` Justin (Gus) Hurwitz
2001-06-28 16:20 ` Matthew Locke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).