[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 31 05:04:30 PDT 2024
================
@@ -0,0 +1,58 @@
+// REQUIRES: system-linux, native
----------------
labath wrote:
I would like to see a test which uses an on-disk section-header-free object file. (Maybe you could base it off of llvm/test/tools/llvm-readobj/ELF/dynamic-reloc-no-section-headers.test). The in-memory test has a lot of moving parts, it seems pretty fragile(*), and can only run on linux (or at least an elf system). OTOH, an on-disk test would be very self contained and can run anywhere. If this breaks (which I'm sure it eventually will), I'd much rather be debugging the second one.
I know that in-memory object files are your main use case, and we should have a test for that, but I think it should be like a cherry on top rather than the first&only line of defense.
(*) It relies on certain entries being produces by the linker. Most of these are pretty much guaranteed to be there, but for example DT_NEEDED(libc) may not exist if the c library is linked statically. If we can test all of the small pieces with files, then I think it'd be best if the overall in memory test was a full end-to-end API test, which actually deletes the object file, and then verifies that we're still able to read certain things from the object.
https://github.com/llvm/llvm-project/pull/101237
More information about the lldb-commits
mailing list