bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/18087] objcopy --compress-debug-sections can produce broke


From: jon.turney at dronecode dot org.uk
Subject: [Bug binutils/18087] objcopy --compress-debug-sections can produce broken debug sections in PE binaries
Date: Sat, 07 Mar 2015 22:11:32 +0000

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

--- Comment #4 from Jon TURNEY <jon.turney at dronecode dot org.uk> ---
(In reply to Jon TURNEY from comment #2)
> So not compressing if the section gets larger sounds like a better approach.
> I'll have a go at implementing that.

This turns out to be not quite so simple due to the bfd interface for dealing
with compressed sections, but an attempt is attached.

With this patch, objcopy --compress-debug-sections on the same test binary
produces:

Name                      VirtSize   VMA        RawSize    Offset     Flags
   .text                  0017df74   00001000   0017e000   00000600   60500060
   .data                  00004184   0017f000   00004200   0017e600   c0700040
  .rdata                  000321e0   00184000   00032200   00182800   40700040
.buildid                  00000035   001b7000   00000200   001b4a00   40300040
      /4 .eh_frame        00049240   001b8000   00049400   001b4c00   40300040
    .bss                  0000eae0   00202000   00000000   00000000   c0700080
  .edata                  0002a0a5   00211000   0002a200   001fe000   40300040
  .idata                  00004c70   0023c000   00004e00   00228200   c0300040
   .rsrc                  00007800   00241000   00007400   0022d000   c0300040
  .reloc                  0000d1bc   00249000   0000d200   00234400   42300040
     /14 .zdebug_aranges  00002fb0   00257000   00001200   00241600   42400040
     /30 .zdebug_info     007c423e   0025a000   00356200   00242800   42100040
     /43 .zdebug_abbrev   00056487   00a1f000   0000d600   00598a00   42100040
     /58 .zdebug_line     0009576a   00a76000   00040600   005a6000   42100040
     /71 .debug_frame     00000038   00b0c000   00000200   005e6600   42300040
     /84 .zdebug_str      00026a8b   00b0d000   00005c00   005e6800   42100040
     /96 .zdebug_loc      001799f0   00b34000   0007de00   005ec400   42100040
    /108 .zdebug_ranges   00038b88   00cae000   00013000   0066a200   42100040

Note that the .debug_frame section didn't get compressed.

The unstripped output of objcopy can also successfully be executed.

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