This is the mail archive of the 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]

[PATCH] Run vismain only if linker supports protected data symbol

Gold doesn't support protected data symbol:

configure:5672: checking linker support for protected data symbol
configure:5682: gcc -fuse-ld=gold -nostdlib -nostartfiles -fno-stack-protector -fPIC -shared conftest.c -o
configure:5685: $? = 0
configure:5692: gcc -fuse-ld=gold -nostdlib -nostartfiles -fno-stack-protector conftest.c -o conftest
/usr/local/bin/ error: /tmp/ccXWoofs.o: cannot make copy relocation for protected symbol 'bar', defined in
collect2: error: ld returned 1 exit status

Run vismain only if linker supports protected data symbol.

Any comments?

	* elf/Makefile (tests): Add vismain only if
	$(have-protected-data) == yes.
	(tests-pie): Likewise.
 elf/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elf/Makefile b/elf/Makefile
index 201b328..62084b4 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -289,10 +289,12 @@ ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 tests += tst-pie1 tst-pie2
 tests-pie += tst-pie1 tst-pie2
+ifeq (yes,$(have-protected-data))
 tests += vismain
 tests-pie += vismain
 CFLAGS-vismain.c = $(PIE-ccflag)
 modules-execstack-yes = tst-execstack-mod
 extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))

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