https://sourceware.org/bugzilla/show_bug.cgi?id=18308
Bug ID: 18308 Summary: strip increases file size six times Product: binutils Version: 2.25 Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: dilyan.palauzov at aegee dot org I created this binary with gold 2.25/1.11: http://mail.aegee.org/dpa/bz18288/strip/opendkim-gold2.25-unstripped unstripped size is 475 880 bytes. When I strip it, the size increases to 2 560 600 bytes (http://mail.aegee.org/dpa/bz18288/strip/opendkim-gold2.25-stripped) . I use strip 2.25 . This is a bug, as strip without parameters increases the file size. The diff of readelf --all of both files is: # diff stripped unstripped --- stripped 2015-04-23 13:22:32.692277302 +0000 +++ unstripped 2015-04-23 13:22:00.942278193 +0000 @@ -10,7 +10,7 @@ Version: 0x1 Entry point address: 0x40c0d4 Start of program headers: 64 (bytes into file) - Start of section headers: 2558744 (bytes into file) + Start of section headers: 474024 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) @@ -56,29 +56,29 @@ 000000000000a0a4 0000000000000000 A 0 0 8 [16] .eh_frame_hdr PROGBITS 000000000046f4e4 0006f4e4 00000000000016d4 0000000000000000 A 0 0 4 - [17] .ctors PROGBITS 0000000000471c80 0026ebf0 + [17] .ctors PROGBITS 0000000000471c80 00071c80 0000000000000010 0000000000000000 WA 0 0 8 - [18] .dtors PROGBITS 0000000000471c90 0026ec00 + [18] .dtors PROGBITS 0000000000471c90 00071c90 0000000000000010 0000000000000000 WA 0 0 8 - [19] .jcr PROGBITS 0000000000471ca0 0026ec10 + [19] .jcr PROGBITS 0000000000471ca0 00071ca0 0000000000000008 0000000000000000 WA 0 0 8 - [20] .dynamic DYNAMIC 0000000000471ca8 0026ec18 + [20] .dynamic DYNAMIC 0000000000471ca8 00071ca8 0000000000000330 0000000000000010 WA 4 0 8 - [21] .got PROGBITS 0000000000471fd8 0026ef48 + [21] .got PROGBITS 0000000000471fd8 00071fd8 0000000000000010 0000000000000000 WA 0 0 8 - [22] .got.plt PROGBITS 0000000000471fe8 0026ef58 + [22] .got.plt PROGBITS 0000000000471fe8 00071fe8 0000000000000ac8 0000000000000000 WA 0 0 8 - [23] .data PROGBITS 0000000000472ac0 0026fa30 + [23] .data PROGBITS 0000000000472ac0 00072ac0 0000000000000f9c 0000000000000000 WA 0 0 64 - [24] .tm_clone_table PROGBITS 0000000000473a60 002709d0 + [24] .tm_clone_table PROGBITS 0000000000473a60 00073a60 0000000000000000 0000000000000000 WA 0 0 8 - [25] .bss NOBITS 0000000000474a60 002709d0 - 0000000000013b48 0000000000000000 WA 0 0 4194304 - [26] .comment PROGBITS 0000000000000000 002709d0 + [25] .bss NOBITS 0000000000474a60 00074a60 + 0000000000013b48 0000000000000000 WA 0 0 2109584 + [26] .comment PROGBITS 0000000000000000 00073a60 0000000000000023 0000000000000001 MS 0 0 1 - [27] .note.gnu.gold-ve NOTE 0000000000000000 002709f4 + [27] .note.gnu.gold-ve NOTE 0000000000000000 00073a84 000000000000001c 0000000000000000 0 0 4 - [28] .shstrtab STRTAB 0000000000000000 00270a10 + [28] .shstrtab STRTAB 0000000000000000 00073aa0 0000000000000102 0000000000000000 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), l (large) @@ -97,9 +97,9 @@ [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 0x0000000000070bb8 0x0000000000070bb8 R E 1000 - LOAD 0x000000000026ebf0 0x0000000000471c80 0x0000000000471c80 + LOAD 0x0000000000071c80 0x0000000000471c80 0x0000000000471c80 0x0000000000001de0 0x0000000000016928 RW 203090 - DYNAMIC 0x000000000026ec18 0x0000000000471ca8 0x0000000000471ca8 + DYNAMIC 0x0000000000071ca8 0x0000000000471ca8 0x0000000000471ca8 0x0000000000000330 0x0000000000000330 RW 8 NOTE 0x0000000000000254 0x0000000000400254 0x0000000000400254 0x0000000000000020 0x0000000000000020 R 4 @@ -107,7 +107,7 @@ 0x00000000000016d4 0x00000000000016d4 R 4 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0 - GNU_RELRO 0x000000000026ebf0 0x0000000000471c80 0x0000000000471c80 + GNU_RELRO 0x0000000000071c80 0x0000000000471c80 0x0000000000471c80 0x0000000000000380 0x0000000000000380 RW 8 Section to Segment mapping: @@ -122,7 +122,7 @@ 07 08 .ctors .dtors .jcr .dynamic .got -Dynamic section at offset 0x26ec18 contains 46 entries: +Dynamic section at offset 0x71ca8 contains 46 entries: Tag Type Name/Value 0x0000000000000003 (PLTGOT) 0x471fe8 0x0000000000000002 (PLTRELSZ) 8208 (bytes) @@ -1019,7 +1019,7 @@ GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Linux, ABI: 3.2.6 -Displaying notes found at file offset 0x002709f4 with length 0x0000001c: +Displaying notes found at file offset 0x00073a84 with length 0x0000001c: Owner Data size Description GNU 0x00000009 NT_GNU_GOLD_VERSION (gold version) Version: gold 1.11 -- 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