When analyzing an AARCH64 linux kernel module built with support for
either R_AARCH64_ABS64 or R_AARCH64_PREL32 relocations, we need these
macros to be defined in elf.h (i.e a recent enough version of libelf),
otherwise we cannot properly support those kernel modules using the
scheme that uses the relocation table of the __ksymtab and
__ksymtab_gpl sections to read those sections.
In the future, I think we should automatically fallback to another way
of trying to read those sections if those macros are not defined, and
emit a message hinting at what is happening, when in verbose mode. I
am keeping it as is for the moment, so that we can get a better case
of the when these macros are not defined and whatnot.
In the mean time, this patch conditionalizes the test that reads a
kernel module build with support for these relocations to avoid
running it on platform that support these relocations.
* tests/test-read-dwarf.cc: Do not run the test on
PR25007-sdhci.ko if the macros R_AARCH64_PREL32 and
R_AARCH64_ABS64 are not defined.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
"data/test-read-dwarf/PR24378-fn-is-not-scope.abi",
"output/test-read-dwarf/PR24378-fn-is-not-scope.abi",
},
+#if defined(HAVE_R_AARCH64_ABS64_MACRO) && defined(HAVE_R_AARCH64_PREL32_MACRO)
{
"data/test-read-dwarf/PR25007-sdhci.ko",
"",
"data/test-read-dwarf/PR25007-sdhci.ko.abi",
"output/test-read-dwarf/PR25007-sdhci.ko.abi",
},
+#endif
// This should be the last entry.
{NULL, NULL, NULL, NULL}
};