bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/20882] New: GNU ld discards sections required by relocations in


From: rguenth at gcc dot gnu.org
Subject: [Bug ld/20882] New: GNU ld discards sections required by relocations in .debug_info with --gc-sections
Date: Tue, 29 Nov 2016 12:43:07 +0000

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

            Bug ID: 20882
           Summary: GNU ld discards sections required by relocations in
                    .debug_info with --gc-sections
           Product: binutils
           Version: 2.27
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

> cat t1.s
        .text
        .globl  main
        .type   main, @function
main:
        ret

        .section        .debug_info,"",@progbits
        .long   t.c.4903c230+2

> cat t2.s
        .section        .debug_info,"",@progbits
        .hidden t.c.4903c230
        .globl t.c.4903c230
t.c.4903c230:
        .long   0x28

> as -o t1.o t1.s
> as -o t2.o t2.s
> ld -o t.o  t1.o t2.o --gc-sections --entry=main
> readelf -S t.o | grep debug_info
  [ 2] .debug_info       PROGBITS         0000000000000000  00000079
> readelf -x 2 t.o

Hex dump of section '.debug_info':
  0x00000000 00000000                            ....


while gold is fine:

> gold -o t.o  t1.o t2.o --gc-sections --entry=main
> readelf -S t.o | grep debug_info
  [ 2] .debug_info       PROGBITS         0000000000000000  00000079
> readelf -x 2 t.o

Hex dump of section '.debug_info':
  0x00000000 06000000 28000000                   ....(...

-- 
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]