http://sourceware.org/bugzilla/show_bug.cgi?id=12409
Summary: --compress-debug-sections doesn't work on empty DWARF sections Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gas AssignedTo: unassig...@sources.redhat.com ReportedBy: hjl.to...@gmail.com CC: ccout...@google.com Gcc may generate assembly codes with empty DWARF sections. --compress-debug-sections failed on them: [hjl@gnu-6 compress-4]$ cat x.s .file "__dn_comp.c" .section .debug_abbrev,"",@progbits .Ldebug_abbrev0: .section .debug_info,"",@progbits .Ldebug_info0: .section .debug_line,"",@progbits .Ldebug_line0: .text .Ltext0: .Letext0: .section .debug_abbrev .byte 0x0 [hjl@gnu-6 compress-4]$ make ./as --compress-debug-sections -o compressed.o x.s objcopy --decompress-debug-sections compressed.o decompressed.o ./as --nocompress-debug-sections -o x.o x.s readelf -w x.o Contents of the .debug_abbrev section: Section '.debug_info' has no debugging data. Section '.debug_line' has no debugging data. readelf -w decompressed.o Contents of the .debug_abbrev section: readelf: Warning: Corrupt unit length (0) found in section .zdebug_info Raw dump of debug contents of section .zdebug_line: readelf: Warning: Only DWARF version 2, 3 and 4 line info is currently supported. cmp decompressed.o x.o decompressed.o x.o differ: byte 41, line 1 make: *** [all] Error 1 [hjl@gnu-6 compress-4]$ -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils