diff options
| author | Yip Coekjan <69834864+Coekjan@users.noreply.github.com> | 2024-07-02 19:47:48 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-02 13:47:48 +0200 |
| commit | 9cd8812d8b2b1648a40c05e02787c375d5ce5cd4 (patch) | |
| tree | c9be3f2f7692387ec8e28d6eb5f0bfd0afb6a3ca /src/elfs/elfload_dump.c | |
| parent | 4b0b3fc98ae4a1e848765e0cd48f958a13fc683d (diff) | |
| download | box64-9cd8812d8b2b1648a40c05e02787c375d5ce5cd4.tar.gz box64-9cd8812d8b2b1648a40c05e02787c375d5ce5cd4.zip | |
Handle `.relr.dyn` section (#1626)
Diffstat (limited to 'src/elfs/elfload_dump.c')
| -rw-r--r-- | src/elfs/elfload_dump.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/elfs/elfload_dump.c b/src/elfs/elfload_dump.c index 2a8189b5..62cedcf6 100644 --- a/src/elfs/elfload_dump.c +++ b/src/elfs/elfload_dump.c @@ -367,6 +367,18 @@ void DumpRelATable(elfheader_t *h, int cnt, Elf64_Rela *rela, const char* name) } } +void DumpRelRTable(elfheader_t *h, int cnt, Elf64_Relr *relr, const char *name) +{ + if(box64_dump && h->relr) { + const char* elfname = ElfName(h); + printf_dump(LOG_NEVER, "ELF Dump %s Table(%d) @%p\n", name, cnt, relr); + for (int i = 0; i<cnt; ++i) + printf_dump(LOG_NEVER, " %s:%s[%d] = %p\n", elfname, name, + i, (void*)relr[i]); + printf_dump(LOG_NEVER, "ELF Dump %s Table=====\n", name); + } +} + void DumpBinary(char* p, int sz) { // dump p as |