diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-04-11 11:28:08 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-04-22 10:58:32 +0200 |
commit | 30035d67728a846fa39749cd162afd278ac654c4 (patch) | |
tree | 172806ab5cbfed5c5860ba251d990813181694d1 /elf/Makefile | |
parent | 3e29dc5233a0c1b78dd008383ca12afac7d9366f (diff) | |
download | glibc-30035d67728a846fa39749cd162afd278ac654c4.tar.gz glibc-30035d67728a846fa39749cd162afd278ac654c4.tar.xz glibc-30035d67728a846fa39749cd162afd278ac654c4.zip |
scripts: Add glibcelf.py module
Hopefully, this will lead to tests that are easier to maintain. The current approach of parsing readelf -W output using regular expressions is not necessarily easier than parsing the ELF data directly. This module is still somewhat incomplete (e.g., coverage of relocation types and versioning information is missing), but it is sufficient to perform basic symbol analysis or program header analysis. The EM_* mapping for architecture-specific constant classes (e.g., SttX86_64) is not yet implemented. The classes are defined for the benefit of elf/tst-glibcelf.py. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile index d30d0ee917..3d79f40879 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -1115,6 +1115,13 @@ tests-special += $(objpfx)check-abi-ld.out update-abi: update-abi-ld update-all-abi: update-all-abi-ld +tests-special += $(objpfx)tst-glibcelf.out +$(objpfx)tst-glibcelf.out: tst-glibcelf.py elf.h $(..)/scripts/glibcelf.py \ + $(..)/scripts/glibcextract.py + PYTHONPATH=$(..)scripts $(PYTHON) tst-glibcelf.py \ + --cc="$(CC) $(patsubst -DMODULE_NAME=%,-DMODULE_NAME=testsuite,$(CPPFLAGS))" \ + < /dev/null > $@ 2>&1; $(evaluate-test) + # The test requires shared _and_ PIE because the executable # unit test driver must be able to link with the shared object # that is going to eventually go into an installed DSO. |