about summary refs log tree commit diff
path: root/elf/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-06-18 16:42:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-06-18 16:42:10 +0200
commit2c75b545de6fe3c44138799c68217a94bc669a88 (patch)
treefa8cd3f23ec090151bfac600ee394757634cfa05 /elf/Makefile
parent02d8b5ab1c89bcef2627d2b621bfb35b573852c2 (diff)
downloadglibc-2c75b545de6fe3c44138799c68217a94bc669a88.tar.gz
glibc-2c75b545de6fe3c44138799c68217a94bc669a88.tar.xz
glibc-2c75b545de6fe3c44138799c68217a94bc669a88.zip
elf: Refuse to dlopen PIE objects [BZ #24323]
Another executable has already been mapped, so the dynamic linker
cannot perform relocations correctly for the second executable.
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 08e2f999bf..27a2fa8c14 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -310,7 +310,7 @@ test-xfail-tst-protected1b = yes
 endif
 ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
-tests += tst-pie1 tst-pie2
+tests += tst-pie1 tst-pie2 tst-dlopen-pie
 tests-pie += tst-pie1 tst-pie2
 ifeq (yes,$(have-protected-data))
 tests += vismain
@@ -1084,6 +1084,8 @@ CFLAGS-tst-pie2.c += $(pie-ccflag)
 
 $(objpfx)tst-piemod1.so: $(libsupport)
 $(objpfx)tst-pie1: $(objpfx)tst-piemod1.so
+$(objpfx)tst-dlopen-pie: $(libdl)
+$(objpfx)tst-dlopen-pie.out: $(objpfx)tst-pie1
 
 ifeq (yes,$(build-shared))
 # NB: Please keep cet-built-dso in sysdeps/x86/Makefile in sync with