Summary: | dostrip: add some way to fine-tune the stripping performed | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Eli Schwartz <eschwartz93> |
Component: | PMS/EAPI | Assignee: | PMS/EAPI <pms> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | sam, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=920753 https://bugs.gentoo.org/show_bug.cgi?id=926120 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Eli Schwartz
2023-12-26 21:46:41 UTC
More generally, from the glibc ebuild: # Note [Disable automatic stripping] # Disabling automatic stripping for a few reasons: # - portage's attempt to strip breaks non-native binaries at least on # arm: bug #697428 # - portage's attempt to strip libpthread.so.0 breaks gdb thread # enumeration: bug #697910. This is quite subtle: # * gdb uses glibc's libthread_db-1.0.so to enumerate threads. # * libthread_db-1.0.so needs access to libpthread.so.0 local symbols # via 'ps_pglobal_lookup' symbol defined in gdb. # * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all # known symbols in 'libpthread.so.0'. Specifically 'nptl_version' # (unexported) is used to sanity check compatibility before enabling # debugging. # Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint # * normal 'strip' command trims '.symtab' # Thus our main goal here is to prevent 'libpthread.so.0' from # losing it's '.symtab' entries. # As Gentoo's strip does not allow us to pass less aggressive stripping # options and does not check the machine target we strip selectively. The last two lines here are key. |