https://sourceware.org/bugzilla/show_bug.cgi?id=20882
--- Comment #3 from rguenther at suse dot de --- On May 16, 2017 7:17:40 PM GMT+02:00, "hjl.tools at gmail dot com" <sourceware-bugzi...@sourceware.org> wrote: >https://sourceware.org/bugzilla/show_bug.cgi?id=20882 > >--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- >Gold keeps all debug info even if they aren't needed: > >[hjl@gnu-6 pr20882]$ cat t1.s > .text > .globl main > .type main, @function >main: > ret > > .section .debug_info,"",@progbits > .long t.c.4903c230+2 >[hjl@gnu-6 pr20882]$ cat t2.s > > .section .debug_info,"",@progbits > .hidden t.c.4903c230 > .globl t.c.4903c230 >t.c.4903c230: > .long 0x28 >[hjl@gnu-6 pr20882]$ cat t3.s > > .section .debug_info,"",@progbits > .hidden t.c.4903c231 > .globl t.c.4903c231 >t.c.4903c231: > .long 0x29 >[hjl@gnu-6 pr20882]$ make y >as -o t1.o t1.s >as -o t2.o t2.s >as -o t3.o t3.s >ld.gold --entry=main -o y t1.o t2.o t3.o >[hjl@gnu-6 pr20882]$ readelf -x .debug_info y > >Hex dump of section '.debug_info': > 0x00000000 06000000 28000000 29000000 ....(...)... > >[hjl@gnu-6 pr20882]$ Probably makes sense. How's debug info made 'necessary' otherwise? I presume GNU ld keeps all debug info from an object that has any other objects used? -- 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