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.

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.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8396859: SA should refer PT_NOTE to obtain Build ID

Changes: https://git.openjdk.org/jdk/pull/33764/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33764&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8396859
  Stats: 263 lines in 6 files changed: 243 ins; 1 del; 19 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

Reply via email to