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: linking ld absolute address


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


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