From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12494 invoked by alias); 1 Mar 2005 17:05:01 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 12211 invoked from network); 1 Mar 2005 17:04:31 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 1 Mar 2005 17:04:31 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j21H4VXv030441 for ; Tue, 1 Mar 2005 12:04:31 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j21H4PK16430 for ; Tue, 1 Mar 2005 12:04:25 -0500 Received: from localhost.localdomain.redhat.com (vpnuser1.surrey.redhat.com [172.16.9.1]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j21H4OZc023987 for ; Tue, 1 Mar 2005 17:04:24 GMT To: binutils@sources.redhat.com Subject: Fix ld-discard/extern test for port which adjust the reloc From: Nick Clifton Date: Tue, 01 Mar 2005 17:05:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-03/txt/msg00038.txt.bz2 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 * 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".