> Currently SA would find Build ID from `SHT_NOTE` to load debuginfo file. > However it does not work in some case for example, ELF binaries which does > not have `.note.gnu.build-id`section. I see this case in vDSO (vdso64.so) in > Linux Kernel 7.2.15-300.fc45.x86_64. This file can be handled in > `debuginfod-find` - it can identify Build ID, and can download appropriate > debuginfo file, but SA cannot identify it. > > It might not be a common case, but we can create such ELF binaries with > `strip -R .note.gnu.build-id`, and it works. So it is better to support such > binaries in SA. In this case, the Build ID note is accessible through a > `PT_NOTE` program header, even though there is no corresponding > `.note.gnu.build-id` section. This change makes SA scan the notes in > `PT_NOTE` segments instead of relying on `SHT_NOTE` section headers to obtain > the Build ID. > > SA already supports debuginfo, but test code is not available. So this PR > adds it. > We need to separate debuginfo from native library and strip it, so I modified > related makefiles to do it in force. It works regardless of > `--with-native-debug-symbols` configure option. > However we cannot test Build ID because the debuginfo depends on Build ID > should be located at debug directory on host e.g. `/usr/lib/debug`. So the > test introduced by this PR tests to load debug symbols from separated > debuginfo file. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Yasumasa Suenaga has updated the pull request incrementally with four additional commits since the last revision: - Remove blank line - improvement - Fix - Exclude libDebuginfoTest.c from non-Linux platforms ------------- Changes: - all: https://git.openjdk.org/jdk/pull/33764/files - new: https://git.openjdk.org/jdk/pull/33764/files/cecbe2d7..86ce8e04 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=33764&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33764&range=00-01 Stats: 23 lines in 3 files changed: 10 ins; 5 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/33764.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33764/head:pull/33764 PR: https://git.openjdk.org/jdk/pull/33764
