public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors
@ 2009-05-26  7:34 aurelien at aurel32 dot net
  2009-05-26  7:35 ` [Bug ports/10201] " aurelien at aurel32 dot net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: aurelien at aurel32 dot net @ 2009-05-26  7:34 UTC (permalink / raw)
  To: glibc-bugs

ld.so fails to link on alpha to relocation errors. The solution is to use -fPIC 
instead of -fpic for rtld.c. Patch will follow.

-- 
           Summary: ld.so fails to link on alpha due to relocation errors
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ports
        AssignedTo: roland at gnu dot org
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10201

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ports/10201] ld.so fails to link on alpha due to relocation errors
  2009-05-26  7:34 [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors aurelien at aurel32 dot net
@ 2009-05-26  7:35 ` aurelien at aurel32 dot net
  2010-05-04 16:22 ` rth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: aurelien at aurel32 dot net @ 2009-05-26  7:35 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From aurelien at aurel32 dot net  2009-05-26 07:34 -------
Created an attachment (id=3965)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3965&action=view)
Patch to fix the problem


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10201

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ports/10201] ld.so fails to link on alpha due to relocation errors
  2009-05-26  7:34 [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors aurelien at aurel32 dot net
  2009-05-26  7:35 ` [Bug ports/10201] " aurelien at aurel32 dot net
@ 2010-05-04 16:22 ` rth at gcc dot gnu dot org
  2010-05-04 17:17 ` mattst88 at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2010-05-04 16:22 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2010-05-04 16:22 -------
Show me a log of such a link error.  I don't reproduce it here.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=10201

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ports/10201] ld.so fails to link on alpha due to relocation errors
  2009-05-26  7:34 [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors aurelien at aurel32 dot net
  2009-05-26  7:35 ` [Bug ports/10201] " aurelien at aurel32 dot net
  2010-05-04 16:22 ` rth at gcc dot gnu dot org
@ 2010-05-04 17:17 ` mattst88 at gmail dot com
  2010-05-04 22:51 ` vapier at gentoo dot org
  2010-05-05 14:59 ` rth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mattst88 at gmail dot com @ 2010-05-04 17:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From mattst88 at gmail dot com  2010-05-04 17:16 -------
Can you still reproduce this?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10201

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ports/10201] ld.so fails to link on alpha due to relocation errors
  2009-05-26  7:34 [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors aurelien at aurel32 dot net
                   ` (2 preceding siblings ...)
  2010-05-04 17:17 ` mattst88 at gmail dot com
@ 2010-05-04 22:51 ` vapier at gentoo dot org
  2010-05-05 14:59 ` rth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2010-05-04 22:51 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From vapier at gentoo dot org  2010-05-04 22:50 -------
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

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |toolchain at gentoo dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10201

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ports/10201] ld.so fails to link on alpha due to relocation errors
  2009-05-26  7:34 [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors aurelien at aurel32 dot net
                   ` (3 preceding siblings ...)
  2010-05-04 22:51 ` vapier at gentoo dot org
@ 2010-05-05 14:59 ` rth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2010-05-05 14:59 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2010-05-05 14:58 -------
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.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10201

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-05 14:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-26  7:34 [Bug ports/10201] New: ld.so fails to link on alpha due to relocation errors aurelien at aurel32 dot net
2009-05-26  7:35 ` [Bug ports/10201] " aurelien at aurel32 dot net
2010-05-04 16:22 ` rth at gcc dot gnu dot org
2010-05-04 17:17 ` mattst88 at gmail dot com
2010-05-04 22:51 ` vapier at gentoo dot org
2010-05-05 14:59 ` rth at gcc dot gnu dot org

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 read-only IMAP folder(s) and NNTP newsgroup(s).