This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Should elf/tst-dlopen-aout.c fail when compiled as PIE?


Hi Pail,

You are the author of elf/tst-dlopen-aout.c.  Should it fail
when it is compiled as PIE?  With this patch:


diff --git a/elf/Makefile b/elf/Makefile
index e852b5f..7edfcb7 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -150,6 +150,8 @@ tests += loadtest restest1 preloadtest loadfail
multiload origtest resolvfail \
 #  reldep9
 ifeq ($(build-hardcoded-path-in-tests),yes)
 tests += tst-dlopen-aout
+tests-pie += tst-dlopen-aout
+CFLAGS-tst-dlopen-aout.c += $(pie-ccflag)
 endif
 test-srcs = tst-pathopt
 selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)

I got

[hjl@gnu-6 build-x86_64-linux]$ ./elf/tst-dlopen-aout
dlopen unexpectedly succeeded
[hjl@gnu-6 build-x86_64-linux]$

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]