https://sourceware.org/bugzilla/show_bug.cgi?id=33344
Bug ID: 33344
Summary: cannot strip(1) .eh_frame_hdr and .eh_frame sections
anymore
Product: binutils
Version: 2.45
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: rokuyama.rk at gmail dot com
Target Milestone: ---
As a fix for Bug #32341, .note.* sections are moved after .rodata section. For
NetBSD, e.g., segment of .rodata becomes:
```
% cc hello.c -o hello
% readelf -l hello
...
LOAD 0x0000000000002000 0x0000000000402000 0x0000000000402000
0x00000000000001d0 0x00000000000001d0 R 0x1000
...
04 .rodata .eh_frame_hdr .eh_frame .note.netbsd.ident .note.netbsd.pax
...
```
Here, .eh_frame_hdr and .eh_frame sections lie between .rodata and
.note.netbsd.* sections. As a result, strip(1) cannot remove these sections:
```
% strip -R .eh_frame_hdr -R .eh_frame hello -o hello.stripped
% readelf -l hello.stripped
...
LOAD 0x0000000000002000 0x0000000000402000 0x0000000000402000
0x00000000000001d0 0x00000000000001d0 R 0x1000
...
04 .rodata .note.netbsd.ident .note.netbsd.pax
...
```
You can see the size of segment is not changed at all. This results in
regression of stripped-binary sizes for NetBSD.
--
You are receiving this mail because:
You are on the CC list for the bug.