ld-elf/exclude1.s, exclude.exp

Hans-Peter Nilsson hp@bitrange.com
Mon Oct 18 22:28:00 GMT 2004


On Mon, 18 Oct 2004, Daniel Jacobowitz wrote:
> On Mon, Oct 18, 2004 at 02:59:32PM -0400, Hans-Peter Nilsson wrote:
> > Wait... I take that back: the code is going into a DSO, so an
> > absolute reloc is going to get problems with targets where ld
> > complains about the result being textrel: "you probably meant to
> > compile with -fPIC" and similar.
>
> I knew there a reason I wanted to use a PC-relative relocation...
> however, this would work just as well if you put it into .data instead.
> Does that work?

That'd work (from inspection, not by testing) and it seems no
further changes would be needed. I thought you had a reason to
put this in .text, but didn't bother to check...

brgds, H-P



More information about the Binutils mailing list