https://sourceware.org/bugzilla/show_bug.cgi?id=19167
Bug ID: 19167 Summary: --gc-sections is broken with __start_ 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 CC: amodra at gmail dot com Target Milestone: --- [hjl@gnu-6 gc-4]$ cat a.s .globl _start _start: .dc.a __start__foo .section _foo,"aw",%progbits foo: .ascii "This is " [hjl@gnu-6 gc-4]$ cat b.s .section _foo,"aw",%progbits .ascii "a test.\0" [hjl@gnu-6 gc-4]$ make gcc -B./ -fdata-sections -c -o a.o a.s gcc -B./ -fdata-sections -c -o b.o b.s ./ld --gc-sections -o x a.o b.o objdump -s -j _foo x x: file format elf64-x86-64 Contents of section _foo: 6000b8 54686973 20697320 This is [hjl@gnu-6 gc-4]$ rm x [hjl@gnu-6 gc-4]$ make LD=ld.gold ld.gold --gc-sections -o x a.o b.o objdump -s -j _foo x x: file format elf64-x86-64 Contents of section _foo: 4010b8 54686973 20697320 61207465 73742e00 This is a test.. [hjl@gnu-6 gc-4]$ -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils