This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld: EXTERN/--unresolved & unresolved Symbols
- From: Ramana <ramana dot venkat83 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 2 Aug 2010 14:41:46 +0530
- Subject: Re: ld: EXTERN/--unresolved & unresolved Symbols
- References: <AANLkTin85sxJOY5YGas_a8Kt7znJrre4DTgrjJyaOL3=@mail.gmail.com>
> 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).
You probably have to force the linker to generate relocations (-q or
--emit-relocs) into the executable image you are creating otherwise
linker doesn't know how to fix the unresolved symbol 'foo' correctly
even if it finds a definition of it.
Ram
Freescale Semiconductor, Inc