diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-12-21 13:42:28 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-01-24 06:37:36 -0800 |
commit | d8d94863ef125a392b929732b37e07dc927fbcd1 (patch) | |
tree | 24b3c5add86c3bc0eb2afeb9f9fc401d87bf252f /elf/Makefile | |
parent | e4c9268d154ff11c070eba4791d33bd3a5875bca (diff) | |
download | glibc-d8d94863ef125a392b929732b37e07dc927fbcd1.zip glibc-d8d94863ef125a392b929732b37e07dc927fbcd1.tar.gz glibc-d8d94863ef125a392b929732b37e07dc927fbcd1.tar.bz2 |
elf: Add a test for PT_LOAD segments with invalid p_align [BZ #28688]
Build tst-p_alignmod3.so with 256 byte page size and verify that it is
rejected with a proper error message.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile index 687b913..41e0f2e 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -417,6 +417,7 @@ tests += \ tst-p_alignmod2-edit \ tst-p_align1 \ tst-p_align2 \ + tst-p_align3 \ tst-relsort1 \ tst-ro-dynamic \ tst-rtld-run-static \ @@ -742,6 +743,7 @@ modules-names = \ tst-nodelete-opened-lib \ tst-null-argv-lib \ tst-p_alignmod-base \ + tst-p_alignmod3 \ tst-relsort1mod1 \ tst-relsort1mod2 \ tst-ro-dynamic-mod \ @@ -2622,3 +2624,10 @@ $(objpfx)tst-p_alignmod2.so: $(objpfx)tst-p_alignmod2-edit \ cp $(objpfx)tst-p_alignmod-base.so $@ $(test-wrapper-env) $(run-program-env) $(rtld-prefix) \ $(objpfx)tst-p_alignmod2-edit $@ + +LDFLAGS-tst-p_alignmod3.so += -Wl,-z,max-page-size=0x100,-z,common-page-size=0x100 + +$(objpfx)tst-p_align3: $(objpfx)tst-p_alignmod3.so +$(objpfx)tst-p_align3.out: tst-p_align3.sh $(objpfx)tst-p_align3 + $(SHELL) $< $(common-objpfx) '$(test-program-prefix)'; \ + $(evaluate-test) |