ld/testsuite/ld-elf/merge.s causes m32r gas assert failure

Alan Modra amodra@bigpond.net.au
Tue Jun 10 23:12:00 GMT 2003


On Tue, Jun 10, 2003 at 10:10:03AM -0700, Doug Evans wrote:
> Why is gas generating a pc-relative reloc that the target doesn't support?

See TC_FORCE_RELOCATION_SUB_LOCAL, and from there DIFF_EXPR_OK.

tc-m32r.h even says
#define DIFF_EXPR_OK		/* .-foo gets turned into PC relative relocs */

The comment has it back to front too.  Should be "foo - ."

> Is it the case that gas shouldn't have generated the pc-relative reloc?

Yep.

> Or are these ports incomplete and this reloc should be handled?

That too.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list