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]

ld: EXTERN/--unresolved & unresolved Symbols


 Hello,
I have got some problems with ld. But first, I do _not_ want to use
shared libraries, they are simply no option for me and what I want to
do, so please, no recommendations on using those.

1) the man pages state that I can use --unresolved=Foo to force symbol
Foo to be unresolved in the output file. Whenever I do that it just does
nothing as far as I can tell (as does EXTERN in a linker script). I
still get an error saying that Foo is unresolved. Is there an example on
how to use it? I have found _nothing_ about it. Can it only be used in
special modes (e.g. only with -Bdynamic or whatever)? What is this
option for anyway, if this does not work?

2) I can use --unresolved-symbols=ignore-all to simply ignore unresolved
symbols. But is there _some_ way to resolve them later by linking a
second time? Basically I link an executable 'foo' that has an unresolved
symbol 'sym'. Now I want to link a second time and use something like
--defsym=sym=0x200 to define 'sym'. When looking at the resulting
executable with nm, 'sym' is shown there to be defined correctly as
0x200, however when executing 'foo' 'sym' is simply 0 (-> undefined).

I know there is an option (-r) for creating relocatable executables
which directly allows for partial linking and would let me do that,
however there are some drawbacks I cannot live with (I do not want to
explain them here; just take it as given :).

Thank you for your help!

trashmailer


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