Summary: | ld.so fails to link on alpha due to relocation errors | ||
---|---|---|---|
Product: | glibc | Reporter: | Aurelien Jarno <aurelien> |
Component: | ports | Assignee: | Roland McGrath <roland> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | glibc-bugs, toolchain |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | alphaev68-unknown-linux-gnu | Target: | alphaev68-unknown-linux-gnu |
Build: | alphaev68-unknown-linux-gnu | Last reconfirmed: | |
Attachments: | Patch to fix the problem |
Description
Aurelien Jarno
2009-05-26 07:34:40 UTC
Created attachment 3965 [details]
Patch to fix the problem
Show me a log of such a link error. I don't reproduce it here. Can you still reproduce this? i added this to the Gentoo patchset because i was hitting this error. my system is obviously using Gentoo patches, but they are by & large bug fixes/backports. i havent attempted a pure vanilla build since gcc/glibc vanilla releases of late tend to have problems on alpha, and because i dont believe the original reporter here is using Gentoo. perhaps the important piece is that we're both targeting alphaev68-linux-gnu and not something like alpha-linux-gnu ... this is the build failure as seen with gcc-4.4.3 and glibc-2.11.1 (reformatted slightly for bugzilla comment posting): alphaev68-unknown-linux-gnu-gcc -nostdlib -nostartfiles -shared \ -Wl,-z,now -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both \ -Wl,-z,defs -Wl,--verbose 2>&1 \ | LC_ALL=C sed \ -e '/^=========/,/^=========/!d;/^=========/d' \ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \ > ${build}/elf/ld.so.lds alphaev68-unknown-linux-gnu-gcc -nostdlib -nostartfiles -shared \ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,now \ -o ${build}/elf/ld.so ${build}/elf/librtld.os \ -Wl,--version-script=${build}/ld.map \ -Wl,-soname=ld-linux.so.2 \ -T ${build}/elf/ld.so.lds ${build}/elf/librtld.os: In function `security_init': (.text+0x7a8): relocation truncated to fit: GPREL16 against symbol `_dl_random' defined in .data.rel.ro section in ${build}/elf/librtld.os ${build}/elf/librtld.os: In function `security_init': (.text+0x818): relocation truncated to fit: GPREL16 against symbol `_dl_random' defined in .data.rel.ro section in ${build}/elf/librtld.os collect2: ld returned 1 exit status make[2]: *** [${build}/elf/ld.so] Error 1 This error is fixed in commit d09580b1e6c3158fd00a41e71ec5a4ace9f0a2fe. As the dump from my just-built ld.so has [19] .got PROGBITS 0000000000034078 00024078 0000000000000048 0000000000000000 WA 0 0 8 [20] .sdata PROGBITS 00000000000340c0 000240c0 0000000000001010 0000000000000000 WAp 0 0 8 [21] .sbss NOBITS 00000000000350d0 000250d0 000000000000011c 0000000000000000 WAp 0 0 8 a small data area of 4468 bytes, I sincerely doubt this is going to grow beyond 64k any time soon. Therefore I'm going to close this bug. Any future link errors as seen in your report should looked at with suspicion that the attributes on the variable are incorrect. |