[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20882] GNU ld discards sections required by relocations in .debu
From: |
rguenther at suse dot de |
Subject: |
[Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections |
Date: |
Tue, 16 May 2017 17:24:45 +0000 |
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"
<address@hidden> 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:
>
>address@hidden pr20882]$ cat t1.s
> .text
> .globl main
> .type main, @function
>main:
> ret
>
> .section .debug_info,"",@progbits
> .long t.c.4903c230+2
>address@hidden pr20882]$ cat t2.s
>
> .section .debug_info,"",@progbits
> .hidden t.c.4903c230
> .globl t.c.4903c230
>t.c.4903c230:
> .long 0x28
>address@hidden pr20882]$ cat t3.s
>
> .section .debug_info,"",@progbits
> .hidden t.c.4903c231
> .globl t.c.4903c231
>t.c.4903c231:
> .long 0x29
>address@hidden 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
>address@hidden pr20882]$ readelf -x .debug_info y
>
>Hex dump of section '.debug_info':
> 0x00000000 06000000 28000000 29000000 ....(...)...
>
>address@hidden 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 ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, rguenth at gcc dot gnu.org, 2017/05/16
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, rguenth at gcc dot gnu.org, 2017/05/16
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, hjl.tools at gmail dot com, 2017/05/16
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections,
rguenther at suse dot de <=
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, hjl.tools at gmail dot com, 2017/05/16
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, hjl.tools at gmail dot com, 2017/05/16
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, hjl.tools at gmail dot com, 2017/05/16
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, cvs-commit at gcc dot gnu.org, 2017/05/17
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, hjl.tools at gmail dot com, 2017/05/17
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, cvs-commit at gcc dot gnu.org, 2017/05/18
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, rguenther at suse dot de, 2017/05/18
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, nickc at redhat dot com, 2017/05/18
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, amodra at gmail dot com, 2017/05/18
- [Bug ld/20882] GNU ld discards sections required by relocations in .debug_info with --gc-sections, hjl.tools at gmail dot com, 2017/05/18