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: Resolving External References


Hi Savithri,

> I am using "ld" command to link 2 object files a.o and b.o
> a.o has an external reference to function foo() defined in b.o
> 
> When I look at the objdump, it has resolved the external reference to
> different address rather than that of foo().

Please could you provide more information about your problem.  In
particular:

  * What version of binutils are you using ?

  * What host are you running on ?

  * What target are the binutils targeted at, (if it is different from
    your host) ?

  * What command line did you use in order to link together a.o and
    b.o ?

  * What address does object show for the reference to foo() from a.o
    ?  What address should it be ?

  * Does the linked program work, despite the apparent discrepancy in
    addresses ?

  * Do you have a *small* example that reproduces the problem ?

Cheers
        Nick


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