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

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,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-bug.tar.gz
Type: application/x-gzip
Size: 1032 bytes
Desc: not available
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-bug.txt
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: versions.txt
URL: <>

More information about the Binutils mailing list