This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Resolving External References
- From: Nick Clifton <nickc at redhat dot com>
- To: "Savithri Venkatachalapathy, Noida" <savithriv at noida dot hcltech dot com>
- Cc: binutils at sources dot redhat dot com, "Rishabh Gupta, Noida" <rishabhg at noida dot hcltech dot com>, binutils at sourceware dot cygnus dot com
- Date: 26 Mar 2003 12:38:57 +0000
- Subject: Re: Resolving External References
- References: <E04CF3F88ACBD5119EFE00508BBB21210856FBAA@exch-01.noida.hcltech.com>
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