From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30468 invoked by alias); 28 Feb 2014 17:44:28 -0000 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 Received: (qmail 30455 invoked by uid 89); 28 Feb 2014 17:44:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f179.google.com Received: from mail-ie0-f179.google.com (HELO mail-ie0-f179.google.com) (209.85.223.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 28 Feb 2014 17:44:25 +0000 Received: by mail-ie0-f179.google.com with SMTP id to1so3712367ieb.10 for ; Fri, 28 Feb 2014 09:44:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=76vTypDWoS9ZZa+gwXc1/JLqz82EvdKeyRPFVpkNJr8=; b=kFkDJAGgwaAtzLZarUIoHL/sO4tascCS9atmYmIM4Tm+DJRwG774+f7xvFiLBupbHy 4Pu9kc/Bz54ARnOPRdYY/x+ea/lwQHWkWQoYZLk2wjVtMUBFAhYLTfWVscj8WQYeodDQ WYWJLb7QUotAaKPv6/spFxmF2bs5uB1t43XaymJknpOpnRoL5rwqQ1Hp7iZ5zL+SAZ6I Vsb2HF6exVktgBHDG65FfucKbP5Rao9odBYP0zkOIPQ6YbtC2G26rmukkscbwwfHsewG b7drfsp3Plwpe+D1XL/lB8mQVCqIKcl+z/X/RWNAPCSaDYPGlsdNlDGWQYM5ojTPtLXC rFmA== X-Gm-Message-State: ALoCoQlE+POHtExEWHIdMOEVLyp+wcfpK2xChaf+q0vt8QgHULc0NFp46q8bcikLBcemX3eUmIk+8LlcQp8Sg9u4x3+TF01ouZvIW5BB0aLo6NJ6kmsn4Sj/69ootSRnCtdw585mwS7Jl1TZiGR4ezzD6SHMHC30HNpRhTWBW2FewewZfpoz6+wEFg/qsUUqHny/o71d3Do1SrRt4zvnGE59PA3sWBYypw== X-Received: by 10.50.137.100 with SMTP id qh4mr5712245igb.4.1393609464012; Fri, 28 Feb 2014 09:44:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.240.3 with HTTP; Fri, 28 Feb 2014 09:44:03 -0800 (PST) In-Reply-To: <20140228002516.GE14922@bubble.grove.modra.org> References: <20140228002516.GE14922@bubble.grove.modra.org> From: Roland McGrath Date: Fri, 28 Feb 2014 17:44:00 -0000 Message-ID: Subject: Re: PR ld/16643: ARM: BFD_ASSERT when only ref to a GC'd symbol is in a stripped section To: Roland McGrath , "binutils@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-02/txt/msg00182.txt.bz2 On Thu, Feb 27, 2014 at 4:25 PM, Alan Modra wrote: > Here you go, this cures your testcase. Great! Thanks a lot. OK to commit the test case now? OK to backport both fix and test to 2.24? Thanks, Roland ld/testsuite/ 2014-02-28 Roland McGrath PR ld/16643 * ld-arm/gc-hidden-strip.d: New file. * ld-arm/gc-hidden-strip-unused.s: New file. * ld-arm/gc-hidden-strip-main.s: New file. * ld-arm/arm-elf.exp: Run the new test. --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -842,3 +842,4 @@ if { ![istarget "arm*-*-nacl*"] } { } run_dump_test "unresolved-2" run_dump_test "gc-hidden-1" +run_dump_test "gc-hidden-strip" --- /dev/null +++ b/ld/testsuite/ld-arm/gc-hidden-strip-main.s @@ -0,0 +1,6 @@ + .text + .globl foo + .type foo, %function +foo: + bx lr + .size foo, . - foo --- /dev/null +++ b/ld/testsuite/ld-arm/gc-hidden-strip-unused.s @@ -0,0 +1,11 @@ + .section .data.unused_item,"aw",%progbits + .p2align 2 + .global unused_item + .hidden unused_item + .type unused_item, %object + .size unused_item, 4 +unused_item: + .word 1 + + .section .debug_blah,"",%progbits + .word unused_item --- /dev/null +++ b/ld/testsuite/ld-arm/gc-hidden-strip.d @@ -0,0 +1,15 @@ +#source: gc-hidden-strip-main.s +#source: gc-hidden-strip-unused.s +#ld: --gc-sections --shared --strip-all +#objdump: -RT +# This test is only valid on ELF based ports. +# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +# See PR ld/16643: the only reference to a GC'd symbol is in a stripped +# section, trigging a BFD_ASSERT. + +.*: file format elf32-.* + +DYNAMIC SYMBOL TABLE: +0+[0-9a-f]+ l\s+d\s+\.text\s+0+\s+\.text +#pass