Fix ld-discard/extern test for port which adjust the reloc
Nick Clifton
nickc@redhat.com
Tue Mar 1 17:05:00 GMT 2005
Hi Guys,
I am applying the patch below to fix the ld-discard/extern test so
that it will no longer fail for targets which set EXTERN_FORCE_RELOC
to zero. For such targets the relocation generated will have been
adjusted to be against the section symbol and so it is the section
name that will appear in the warning message. This fixes unexpected
failures for the avr-elf, d10v-elf, ip2k-elf and m68k-elf targets.
Cheers
Nick
ld/testsuite/ChangeLog
2005-03-01 Nick Clifton <nickc@redhat.com>
* ld-discard/extern.d: Adjust expected warning to take into
account the fact that the linker's name might be included and that
the reloc might have been adjusted to be against the section
symbol.
Index: ld/testsuite/ld-discard/extern.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-discard/extern.d,v
retrieving revision 1.7
diff -c -3 -p -r1.7 extern.d
*** ld/testsuite/ld-discard/extern.d 7 Feb 2005 03:09:10 -0000 1.7
--- ld/testsuite/ld-discard/extern.d 1 Mar 2005 16:58:19 -0000
***************
*** 1,5 ****
#source: extern.s
#ld: -T discard.ld
! #warning: `data' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o
#objdump: -p
#pass
--- 1,11 ----
#source: extern.s
#ld: -T discard.ld
! #warning: .*data.* referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o
#objdump: -p
#pass
+ # The expected warning used to start with "`data' referenced..." but
+ # this has two problems: 1) It does not include the name of the linker
+ # command which will be present in the message, eg "../ld-new"
+ # 2) Targets which define EXTERN_FORCE_RELOC to 0 in their
+ # gas/config/tc-xxx.h file will convert the symbol in the reloc from
+ # "data" to the section symbol ".data.exit".
More information about the Binutils
mailing list