GNU ld -shared fails to link filtered symbols on Solaris

Martin Man Martin.Man@Sun.COM
Mon Nov 27 21:05:00 GMT 2006


Hi all,

[ sorry for crossposting ]

I have investigated a little bit GNU ld problems on Solaris related to 
filter symbols and I seem to have identified one test case which fails 
under all circumstances. I'd like to get some advices on how to best 
proceed next.

The nice background info to the problem is at 
http://www.opensolaris.org/jive/thread.jspa?threadID=18778&tstart=45.

There seems to be a bug in GNU ld that does not link filter symbols 
properly. The expected behavior is to link in filter symbols as 
`undefined' thus leaving them for resolution at runtime. In certain 
cases, ld does not recognize filter symbols and links them into the 
resulting binary as absolute symbols at address 0x0.

This happens as I could observe when:

1. library that contains filtered symbols is mentioned at the ld 
commandline, i.e. -lpthread, -ldl, -lc
2. -Wl,-shared option is specified

I also know that the problem does not occur when -Wl,-shared is removed 
entirely, or replaced with -Wl,-E or -Wl,-Bdynamic, although I don't 
know how these differ.

There might be other circumstances where this bug exhibits itself, but 
this one is 100% reproducible, I have attached the simple test case + 
its output + version of the software used. The problematic system in 
question is Nexenta GNU Solaris alpha 6.


let me know what other information I can provide,
thanx,
Martin

-- 
http://martinman.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-bug.tar.gz
Type: application/x-gzip
Size: 1032 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20061127/532ea057/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-bug.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20061127/532ea057/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: versions.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20061127/532ea057/attachment-0001.txt>


More information about the Binutils mailing list