This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ld/testsuite/ld-elf/merge.s causes m32r gas assert failure
- From: Doug Evans <dje at sebabeach dot org>
- To: binutils at sources dot redhat dot com
- Date: Tue, 10 Jun 2003 10:10:03 -0700 (PDT)
- Subject: ld/testsuite/ld-elf/merge.s causes m32r gas assert failure
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