This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: pic support question
- From: Ian Lance Taylor <iant at google dot com>
- To: "M R Swami Reddy" <MR dot Swami dot Reddy at nsc dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 03 Jul 2008 20:37:27 -0700
- Subject: Re: pic support question
- References: <486C7241.4070100@nsc.com>
"M R Swami Reddy" <MR.Swami.Reddy@nsc.com> writes:
> Currently I am working supporting PIC feature for a 16-bit processor
> in Binutils. I am able to generate the GOT based relocations and .got
> and .got.plt
> sections in the final linking stage. But problem is:
>
> Unable to set/calculate the offset of GOT, for global symbols.
>
> For ex: MOVD a@GOT, (r12)
>
> In the above instruction, a-> is global var and linker should place the
> offset value from Global offset Table. But its happening, Instead linker
> just placing the 'a' address in the above instruction.
>
> Can any one guess, what going wrong in the above
Sound like a problem in the implementation of whatever reloc you
generate for a@GOT. That reloc needs to be implemented correctly in
your backend. The generic code won't do it for you.
Ian