ld/testsuite/ld-elf/merge.s causes m32r gas assert failure
Doug Evans
dje@sebabeach.org
Tue Jun 10 17:45:00 GMT 2003
Running make check for the m32r-elf linker yielded this:
/samantha/gnu-build/m32r/bsrc/ld/../gas/as-new -o tmpdir/dump0.o /home/dje/gnu/m32r/src/ld/testsuite/ld-elf/merge.s
/home/dje/gnu/m32r/src/ld/testsuite/ld-elf/merge.s: Assembler messages:
/home/dje/gnu/m32r/src/ld/testsuite/ld-elf/merge.s:14: Internal error!
Assertion failure in gas_cgen_tc_gen_reloc at ../../src/gas/cgen.c line 704.
The line is:
assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
Studying other ports I see this isn't a cgen-specific thing,
and ld/testsuite/ld-elf/merge.d has the test marked as xfail for several ports.
#xfail: "arc-*-*" "avr-*-*" "cris-*-*" "dlx-*-*" "fr30-*-*" "frv-*-*"
#xfail: "hppa*-*-*" "h8300-*-*" "i960-*-*" "ip2k-*-*" "m32r-*-*" "mcore-*-*"
#xfail: "mn10*-*-*" "mips64*-*-linux*" "openrisc-*-*" "pj-*-*" "sparc*-*-*"
#xfail: "xtensa-*-*"
Does anyone off hand know what's going on here?
Clearly an assert failure is a bug, but what's the bug?
Why is gas generating a pc-relative reloc that the target doesn't support?
Is it the case that gas shouldn't have generated the pc-relative reloc?
Or should the assert be turned into an error message saying "don't do that"?
Or are these ports incomplete and this reloc should be handled?
.section .rodata.str,"aMS","progbits",1
.LC0:
.asciz "abc"
.LC1:
.asciz "c"
.text
.global _start
_start:
.long .LC0
.LT0:
.long .LC1
.long .LC0-.LT0
.long .LC1-.LT0
More information about the Binutils
mailing list