This is the mail archive of the binutils@sources.redhat.com 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: ld --exclude-symbols problems


Mikhail Kruk <meshko at cs dot brandeis dot edu> writes:

> I'm trying to use --exclude-symbols option of ld and it doesn't work.
> I have plain unupdated 8.0 system.
> I try to run gcc -shared -Xlinker --exclude-symbols -Xlinker blah
> or just ld --exclude-symbols blah
> and get unrecognized option '--exclude-symbols' error message.
> I also tried --output-def with exactly the same result.
> Same results on RedHat 7.2 system with ld 2.11.90.0.8. Sorry, don't have 
> the exact ld vresion from the 8.0 system, but it's 2.13 something, the 
> default one.
> Am I doing something wrong? Is it not really implemented? If it is not, 
> what is the right way to specify which symbols I want to export from my 
> shared library?

If you look closely, you will see that the --exclude-symbols option is
described in a section listing options specific to i386 PE targets.
That is, it is only available on Windows.  (Not that there is any
reason it could not be implemented on ELF; in fact, you can acheive
the same effect using version scripts.)

Personally, since this has now come up twice, I think the manual needs
to be changed to mention in each option that the option is specific to
i386 PE.  Right now the manual reads correctly if you read it from top
to bottom, but many people skip around in an info or HTML file, and
when you do that the manual is misleading.

Ian


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