This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PIE and --(no-)export-dynamic


On Sat, Mar 20, 2010 at 02:32:59PM +0100, Peter Hjalmarsson wrote:
> Should the -export-dynamic/--no-export-dynamic do any difference on a
> PIE file?
> 
> As an example lets take ld/testsuite/ld-elfvers/vers4.c.
> compile it:
> 
> $ gcc -o test1 -Wl,--no-export-dynamic vers4.c
> $ gcc -o test2 -fPIE -pie -Wl,--no-export-dynamic vers4.c
> 
> If you objdump -T the resulting files you will see that test2 still
> exports foo@@VERS_2.0 along other things (like main).
> 
> Is this a expected behaviour or is it a bug?

I think you are reading too much into the name of the option.
--no-export-dynamic doesn't say "don't export any dynamic symbols".
It is merely there to turn off --export-dynamic.  See the ld info
doc.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]