linking ld absolute address

Nick Clifton nickc@redhat.com
Wed Dec 3 10:20:00 GMT 2003
Hi Vineet,

>       There is a strange problem which i am facing when i resolve
> absolute address for local label(label  within a file) i get the
> right address, but when i need an absolute address of the label
> outside the file i get a wrong '0' address which is wrong.
> How do i calculate the absolute address of a symbol?

We really need some more information in order to be able to help you
resolve this problem:

  * Which version of binutils are you using ?

  * When are you attempting to get the address of the symbols ?
    Symbols are not assigned addresses until quite late on in the
    linking process, so maybe you are trying to get their addresses
    too soon.

  * Can you provide a *small* example program that demonstrates this
    problem ?

  * What is the context for this problem ?  ie why are you trying to
    obtain the addresses of the symbols ?

Cheers
        Nick



More information about the Binutils mailing list