separateDebugInfo: Create symlinks matching original binaries
For instance, a binary like libfoo.so will cause a symlink lib/debug/libfoo.so.debug -> .build-id/<build-ID>.debug to be created. This is primarily useful for use with eu-addr2line, if you know the name of a binary and the relative address, but not the build ID.
This commit is contained in:
parent
5b20713041
commit
2fcee55e5f
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,9 @@ _separateDebugInfo() {
|
|||
mkdir -p "$dst/${id:0:2}"
|
||||
objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" --compress-debug-sections
|
||||
strip --strip-debug "$i"
|
||||
|
||||
# Also a create a symlink <original-name>.debug.
|
||||
ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue