[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/14663] strip --only-keep-debug doesn't remove .text, etc.
From: |
i at maskray dot me |
Subject: |
[Bug binutils/14663] strip --only-keep-debug doesn't remove .text, etc. |
Date: |
Wed, 18 Sep 2019 02:20:13 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=14663
Fangrui Song <i at maskray dot me> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |i at maskray dot me
--- Comment #8 from Fangrui Song <i at maskray dot me> ---
I want to ask a related question. Why have these sections to be kept in the
section header table while they are made SHT_NOBITS? Don't debuggers/symbolizes
just pick sections they are interested in, i.e. .debug_* (and probably
SHF_ALLOC .note* if that is why SHF_ALLOC+SHT_NOTE is not made SHT_NOBITS)?
In addition, can the program headers be removed? Currently sh_offset in the
section header table, and p_offset/p_filesz in the program headers are
rewritten. Their values no longer reflect the original values (a consequence of
**removed section contents**). If you inspect such separate debug files with
readelf -Sl, you can get weird section->segment attribution. I find gdb and
lldb are still happy with such separate debug files w/o progam headers.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/14663] strip --only-keep-debug doesn't remove .text, etc.,
i at maskray dot me <=