Segfault during 2.3.1 build + patch
Dag Nygren
dag@newtech.fi
Thu Nov 7 04:53:00 GMT 2002
Hi,
just tried to build myself a 2.3.1 glibc and ran into
a segfault that stopped it .
The segfault occured when the build tried to use the newly
built ld.
There might be something in my previous environment, but
the patch below should be pretty harmless (?) for others and
it made my day :-)
My environment:
- gcc 3.2 (the same result with gcc 2.95.3)
- binutils 2.13
- old glibc 2.2.5
The problem is in elf/dl-minimal.c, where _itoa is using a constant
string _itoa_lower_digits, which is declared external. Some lines
below that the real string is declared.
It seems like my environment get's this wrong and generates wrong
address for the string .
There might be a good reason for forward declaring the string but
I am not clever enough to recognize that.... So I just moved the actual
string declaration up before the _itoa() declaration and removed the
forward one, and voila, everything works.
Here is the patch in case someone is interested:
BRGDS
--
Dag Nygren email: dag@newtech.fi
Oy Espoon NewTech Ab phone: +358 9 8024910
Träsktorpet 3 fax: +358 9 8024916
02360 ESBO Mobile: +358 400 426312
FINLAND
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-2.3.1.patch
Type: application/x-patch
Size: 1023 bytes
Desc: gcc-2.3.1.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20021107/c9ed5300/attachment.bin>
More information about the Libc-alpha
mailing list