[prev in list] [next in list] [prev in thread] [next in thread]
List: binutils-bugs
Subject: [Bug gold/20717] New: --gc-sections fails to remove an unused orphan section if the last output sect
From: "ikudrin.dev at gmail dot com" <sourceware-bugzilla () sourceware ! org>
Date: 2016-10-19 13:01:31
Message-ID: bug-20717-70 () http ! sourceware ! org/bugzilla/
[Download RAW message or body]
https://sourceware.org/bugzilla/show_bug.cgi?id=20717
Bug ID: 20717
Summary: --gc-sections fails to remove an unused orphan section
if the last output section has a KEEP command.
Product: binutils
Version: 2.28 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: ikudrin.dev at gmail dot com
CC: ian at airs dot com
Target Milestone: ---
Steps to reproduce:
$ cat > test.cc << EOF
void unused() {}
int main() {return 0;}
EOF
$ cat > test.t << EOF
SECTIONS
{
.dummy : { KEEP (*(.dummy)) }
}
EOF
$ gcc -O0 -ffunction-sections -c test.cc -o test.o
$ gcc -fuse-ld=gold -Wl,--gc-sections,-T,test.t test.o -o test
$ nm -C test | grep unused
00000000000001e9 T unused()
--
You are receiving this mail because:
You are on the CC list for the bug.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic