From 3ee318c9233ce77dee099f2830e8e29a0c572ca7 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 4 Apr 2022 17:19:07 -0700 Subject: Remove -z combreloc and HAVE_Z_COMBRELOC -z combreloc has been the default regadless of the architecture since binutils commit f4d733664aabd7bd78c82895e030ec9779a92809 (2002). The configure check added in commit fdde83499a05 (2001) has long been unneeded. We can therefore treat HAVE_Z_COMBRELOC as always 1 and delete dead code paths in dl-machine.h files (many were copied from commit a711b01d34ca and ee0cb67ec238). Reviewed-by: Adhemerval Zanella --- Makeconfig | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'Makeconfig') diff --git a/Makeconfig b/Makeconfig index 47db08d6ae..0aa5fb0099 100644 --- a/Makeconfig +++ b/Makeconfig @@ -358,12 +358,6 @@ else real-static-start-installed-name = $(static-start-installed-name) endif -ifeq (yesyes,$(build-shared)$(have-z-combreloc)) -combreloc-LDFLAGS = -Wl,-z,combreloc -LDFLAGS.so += $(combreloc-LDFLAGS) -LDFLAGS-rtld += $(combreloc-LDFLAGS) -endif - relro-LDFLAGS = -Wl,-z,relro LDFLAGS.so += $(relro-LDFLAGS) LDFLAGS-rtld += $(relro-LDFLAGS) @@ -421,7 +415,7 @@ ifndef +link-pie +link-pie-before-inputs = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \ -Wl,-O1 -nostdlib -nostartfiles \ $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ + $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ $(firstword $(CRT-$(@F)) $(csu-objpfx)S$(start-installed-name)) \ $(+preinit) $(+prectorS) +link-pie-before-libc = -o $@ $(+link-pie-before-inputs) \ @@ -487,7 +481,7 @@ ifeq (yes,$(build-pie-default)) else # not build-pie-default +link-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \ $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ + $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ $(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \ $(+preinit) $(+prector) +link-before-libc = -o $@ $(+link-before-inputs) \ -- cgit 1.4.1