strip: Overwrite debuglink when it's already present
When objcopy encounters an already-present section, adding the new debuglink will fail with a warning. Remove any existing `.gnu_debuglink` section to work around this problem. Arch Linux's `rust` package is affected by this. Apparently when LLVM's LLD links in `/usr/lib/Scrt1.o` it will also copy the `.gnu_debuglink` section. See: https://bugs.gentoo.org/787623
This commit is contained in:
parent
71afd4d88f
commit
e0162a6868
1 changed files with 1 additions and 0 deletions
|
@ -100,6 +100,7 @@ collect_debug_symbols() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
safe_objcopy "$binary" --remove-section=.gnu_debuglink
|
||||||
safe_objcopy "$binary" --add-gnu-debuglink="$dbgdir/${binary#/}.debug"
|
safe_objcopy "$binary" --add-gnu-debuglink="$dbgdir/${binary#/}.debug"
|
||||||
|
|
||||||
# create any needed hardlinks
|
# create any needed hardlinks
|
||||||
|
|
Loading…
Add table
Reference in a new issue