diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 5 | ||||
-rw-r--r-- | elf/vismain.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile index f78642ed09..20b1682370 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -130,7 +130,7 @@ endif tests += $(tests-static) ifeq (yes,$(build-shared)) tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ - constload1 order vismain noload filter unload \ + constload1 order noload filter unload \ reldep reldep2 reldep3 reldep4 nodelete nodelete2 \ nodlopen nodlopen2 neededtest neededtest2 \ neededtest3 neededtest4 unload2 lateglobal initfirst global \ @@ -218,6 +218,9 @@ ifeq (yesyes,$(have-fpie)$(build-shared)) modules-names += tst-piemod1 tests += tst-pie1 tst-pie2 tests-pie += tst-pie1 tst-pie2 +tests += vismain +tests-pie += vismain +CFLAGS-vismain.c = $(PIE-ccflag) endif modules-execstack-yes = tst-execstack-mod extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) diff --git a/elf/vismain.c b/elf/vismain.c index dfcaeebc7f..05b374812c 100644 --- a/elf/vismain.c +++ b/elf/vismain.c @@ -15,6 +15,11 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +/* This file must be compiled as PIE to avoid copy relocation when + accessing protected symbols defined in shared libaries since copy + relocation doesn't work with protected symbols and linker in + binutils 2.26 enforces this rule. */ + #include <stdio.h> #include <stdlib.h> #include <string.h> |