public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix ld-discard/extern test for port which adjust the reloc
@ 2005-03-01 17:05 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2005-03-01 17:05 UTC (permalink / raw)
  To: binutils

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".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-01 17:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-01 17:05 Fix ld-discard/extern test for port which adjust the reloc Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).