bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/17931] New: --gc-sections doesn't work on section in a group


From: hjl.tools at gmail dot com
Subject: [Bug ld/17931] New: --gc-sections doesn't work on section in a group
Date: Thu, 05 Feb 2015 23:22:15 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17931

            Bug ID: 17931
           Summary: --gc-sections doesn't work on section in a group
           Product: binutils
           Version: 2.26 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com

address@hidden gc-3]$ cat x.s
        .global _start
_start:
        call bar

    .section    .text.bar,"axG",@progbits,foo,comdat
    .weak    bar
    .type    bar,@function
bar:                                    # @bar
    retq

    .section    .text.zed,"axG",@progbits,foo,comdat
    .weak    zed
    .type    zed,@function
zed:                                    # @zed
    retq
address@hidden gc-3]$ make
gcc -O2 -c x.s
./ld --gc-sections -o x x.o
ld.gold --gc-sections -o y x.o
readelf -sW x | grep FUNC
     2: 000000000040007e     0 FUNC    WEAK   DEFAULT    1 zed
     7: 000000000040007d     0 FUNC    WEAK   DEFAULT    1 bar
readelf -sW y | grep FUNC
     2: 000000000040007d     0 FUNC    WEAK   DEFAULT    1 bar
address@hidden gc-3]$ 

zed should be removed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]