aboutsummaryrefslogtreecommitdiff
path: root/ld/configure
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-06-13 15:10:15 +0100
committerNick Clifton <nickc@redhat.com>2024-06-13 15:10:15 +0100
commite8e10743f7b207b21a1efb0cc9e42487080db013 (patch)
treedaeed5b3fb3bdadce5bc0b6297cca0c96aee37a7 /ld/configure
parent888ff82e77d9ab8f04893a68cd6b4f518d6b50d9 (diff)
downloadbinutils-e8e10743f7b207b21a1efb0cc9e42487080db013.zip
binutils-e8e10743f7b207b21a1efb0cc9e42487080db013.tar.gz
binutils-e8e10743f7b207b21a1efb0cc9e42487080db013.tar.bz2
Add --rosegment option to BFD linker to stop the '-z separate-code' from generating two read-only segments.
PR 30907
Diffstat (limited to 'ld/configure')
-rwxr-xr-xld/configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/ld/configure b/ld/configure
index 9151640..83ea68f 100755
--- a/ld/configure
+++ b/ld/configure
@@ -852,6 +852,7 @@ enable_new_dtags
enable_relro
enable_textrel_check
enable_separate_code
+enable_rosegment
enable_mark_plt
enable_warn_execstack
enable_error_execstack
@@ -1547,6 +1548,7 @@ Optional Features:
--enable-textrel-check=[yes|no|warning|error]
enable DT_TEXTREL check in ELF linker
--enable-separate-code enable -z separate-code in ELF linker by default
+ --enable-rosegment enable --rosegment in the ELF linker by default
--enable-mark-plt enable -z mark-plt in ELF x86-64 linker by default
--enable-warn-execstack enable warnings when creating an executable stack
--enable-error-execstack
@@ -15682,6 +15684,17 @@ esac
fi
+# Decide if --rosegment should be enabled in the ELF linker by default.
+ac_default_ld_rosegment=unset
+# Check whether --enable-rosegment was given.
+if test "${enable_rosegment+set}" = set; then :
+ enableval=$enable_rosegment; case "${enableval}" in
+ yes) ac_default_ld_rosegment=1 ;;
+ no) ac_default_ld_rosegment=0 ;;
+esac
+fi
+
+
# Decide if -z mark-plt should be enabled in ELF x86-64 linker by default.
ac_default_ld_z_mark_plt=unset
# Check whether --enable-mark-plt was given.
@@ -19381,6 +19394,15 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+if test "${ac_default_ld_rosegment}" = unset; then
+ ac_default_ld_rosegment=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_LD_ROSEGMENT $ac_default_ld_rosegment
+_ACEOF
+
+
if test "${ac_default_ld_z_mark_plt}" = unset; then
ac_default_ld_z_mark_plt=0
fi