Bug 11718 - GOLD produces nonworking Linux shared librarys
Summary: GOLD produces nonworking Linux shared librarys
Status: RESOLVED WORKSFORME
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.21
: P2 critical
Target Milestone: ---
Assignee: Doug Kwan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 13:41 UTC by Shamil Kurmangaleev
Modified: 2011-07-09 00:19 UTC (History)
2 users (show)

See Also:
Host: arm-unknown-linux-gnueabi
Target: arm-unknown-linux-gnueabi
Build: x86_64-unknown-linux-gnu
Last reconfirmed:


Attachments
testcase in archive (1.50 KB, application/octet-stream)
2010-06-18 13:44 UTC, Shamil Kurmangaleev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shamil Kurmangaleev 2010-06-18 13:41:20 UTC
I'm try build modules for eina:
 
arm-as eina_chained_mempool.s -o chain.o
arm-ld chain.o --eh-frame-hdr -shared -dynamic-linker /lib/ld-linux.so.3 -X -m
armelf_linux_eabi -o
./shared/build/eina/src/modules/mp/chained_pool/.libs/eina_chained_mempool.so
/usr/lib/crti.o /usr/lib/gcc/arm-linux-gnueabi/4.3.2/crtbeginS.o
-L/home/kursh/arm/arm-linux-gnueabi/lib -L/home/kursh/arm/evas/shared/run/lib
-L/usr/lib/gcc/arm-linux-gnueabi/4.3.2
-L/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/lib -L/lib
-L/usr/lib -rpath /home/kursh/arm/evas/shared/run/lib -leina -ldl -lrt -lm
-soname eina_chained_mempool.so -lgcc --as-needed -lgcc_s --no-as-needed
-lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/crtendS.o /usr/lib/crtn.o

A shared library linked with gold (GNU Binutils 2.20.51.20100618) causes
segmentation fault, because GOT entry for some function is zero, while shared
library linked not gold version ld, all work fine.
Gdb says:
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x40023edc in _GLOBAL_OFFSET_TABLE_ () from /home/.../eina_chained_mempool.so

Bug maybe related to PR 11172.
Comment 1 Shamil Kurmangaleev 2010-06-18 13:44:49 UTC
Created attachment 4847 [details]
testcase in archive
Comment 2 Doug Kwan 2010-08-03 20:11:57 UTC
Your testcase needs other libraries.  Can you attached two copies of 
eina_chained_mempool.so, one linked with gold and the ld?

(In reply to comment #0)
> I'm try build modules for eina:
>  
> arm-as eina_chained_mempool.s -o chain.o
> arm-ld chain.o --eh-frame-hdr -shared -dynamic-linker /lib/ld-linux.so.3 -X -m
> armelf_linux_eabi -o
> ./shared/build/eina/src/modules/mp/chained_pool/.libs/eina_chained_mempool.so
> /usr/lib/crti.o /usr/lib/gcc/arm-linux-gnueabi/4.3.2/crtbeginS.o
> -L/home/kursh/arm/arm-linux-gnueabi/lib -L/home/kursh/arm/evas/shared/run/lib
> -L/usr/lib/gcc/arm-linux-gnueabi/4.3.2
> -L/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/lib -
L/lib
> -L/usr/lib -rpath /home/kursh/arm/evas/shared/run/lib -leina -ldl -lrt -lm
> -soname eina_chained_mempool.so -lgcc --as-needed -lgcc_s --no-as-needed
> -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed
> /usr/lib/gcc/arm-linux-gnueabi/4.3.2/crtendS.o /usr/lib/crtn.o
> 
> A shared library linked with gold (GNU Binutils 2.20.51.20100618) causes
> segmentation fault, because GOT entry for some function is zero, while shared
> library linked not gold version ld, all work fine.
> Gdb says:
> 0x00000000 in ?? ()
> (gdb) bt
> #0  0x00000000 in ?? ()
> #1  0x40023edc in _GLOBAL_OFFSET_TABLE_ () from 
/home/.../eina_chained_mempool.so
> 
> Bug maybe related to PR 11172.
Comment 3 Ian Lance Taylor 2011-07-09 00:19:08 UTC
No response to request for more information, so closing.  Please reopen if the problem still exists, and provide a complete test case.  Thanks.