From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29440 invoked by alias); 1 Dec 2011 02:52:26 -0000 Received: (qmail 29350 invoked by uid 22791); 1 Dec 2011 02:52:24 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Dec 2011 02:52:09 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id 11CAC15A30; Thu, 1 Dec 2011 03:52:07 +0100 (CET) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GUwuH6MKTPYr; Thu, 1 Dec 2011 03:52:06 +0100 (CET) Received: from seth.se.axis.com (seth.se.axis.com [10.0.2.172]) by ra.se.axis.com (Postfix) with ESMTP id 3EEC015A2D; Thu, 1 Dec 2011 03:52:06 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id 019FE3E0C9; Thu, 1 Dec 2011 03:52:06 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id pB12q5F6005913; Thu, 1 Dec 2011 03:52:05 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id pB12q57l005909; Thu, 1 Dec 2011 03:52:05 +0100 Date: Thu, 01 Dec 2011 02:52:00 -0000 Message-Id: <201112010252.pB12q57l005909@ignucius.se.axis.com> From: Hans-Peter Nilsson To: binutils@sourceware.org CC: gingold@adacore.com In-reply-to: (macro@codesourcery.com) Subject: Fix CRIS bug exposed by "MIPS/BFD: Don't make debug section relocs dynamic" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00001.txt.bz2 > From: "Maciej W. Rozycki" > Date: Mon, 31 Oct 2011 13:21:52 +0100 > 2011-10-31 Maciej W. Rozycki > > PR ld/10144 > * lib/ld-lib.exp (run_ld_link_tests): Handle sources from other > directories. > (run_ld_link_exec_tests): Likewise. > (run_cc_link_tests): Likewise. > * ld-elf/comm-data1.sd: New test. > * ld-elf/comm-data1.s: Source for the new test. > * ld-elf/comm-data2.sd: New test. > * ld-elf/comm-data2.rd: Likewise. > * ld-elf/comm-data2.xd: Likewise. > * ld-elf/comm-data2.s: Source for the new tests. > * ld-elf/comm-data.exp: Run the new tests. > * ld-mips-elf/comm-data.exp: Likewise. This new test caused the following failure to appear for cris-axis-linux-gnu: Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-elf/comm-data.exp ... FAIL: Common symbol override test ...but it turned out to be a target bug, so...thanks, I guess. :) I see this test fails for m68k-linux too, if someone feels pity (no listed maintainer). No regressions tested cris-elf cris-linux. Can I put this on the 2.22 branch too? bfd: * elf32-cris.c (cris_elf_check_relocs) : Move early break for non-SEC_ALLOC sections before GOT and PLT accounting. Index: elf32-cris.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-cris.c,v retrieving revision 1.117 diff -p -u -r1.117 elf32-cris.c --- elf32-cris.c 19 Oct 2011 07:17:13 -0000 1.117 +++ elf32-cris.c 1 Dec 2011 02:47:49 -0000 @@ -3583,6 +3583,12 @@ cris_elf_check_relocs (bfd *abfd, sec, cris_elf_howto_table[r_type].name); } + + /* We don't need to handle relocs into sections not going into + the "real" output. */ + if ((sec->flags & SEC_ALLOC) == 0) + break; + if (h != NULL) { h->non_got_ref = 1; @@ -3612,11 +3618,6 @@ cris_elf_check_relocs (bfd *abfd, if (! info->shared) break; - /* We don't need to handle relocs into sections not going into - the "real" output. */ - if ((sec->flags & SEC_ALLOC) == 0) - break; - /* We may need to create a reloc section in the dynobj and made room for this reloc. */ if (sreloc == NULL) brgds, H-P