aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-05-22 14:00:06 +0930
committerAlan Modra <amodra@gmail.com>2022-05-26 20:34:32 +0930
commitf420c9c84eb53fea7da452eab8ae0bd855537859 (patch)
tree5c850f6fe17a43f47d62c50b29bb008b32494012 /ld/emultempl
parent20d814202abb0af6f1f37880e3a473362465eaae (diff)
downloadgdb-f420c9c84eb53fea7da452eab8ae0bd855537859.zip
gdb-f420c9c84eb53fea7da452eab8ae0bd855537859.tar.gz
gdb-f420c9c84eb53fea7da452eab8ae0bd855537859.tar.bz2
bit-rot in target before_parse function
Copy initialisation over from the elf.em before_parse. Commit ba951afb999 2022-05-03 changed behaviour on arm and score regarding exec stack. This patch restores the previous behaviour. * emultempl/aarch64elf.em (before_parse): Init separate_code, warn_execstack, no_warn_rwx_segments and default_execstack. * emultempl/armelf.em (before_parse): Likewise. * emultempl/scoreelf.em (before_parse): Likewise. * testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Return true for arm and nacl.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/aarch64elf.em4
-rw-r--r--ld/emultempl/armelf.em4
-rw-r--r--ld/emultempl/scoreelf.em4
3 files changed, 12 insertions, 0 deletions
diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em
index 26e3dd2..1968f12 100644
--- a/ld/emultempl/aarch64elf.em
+++ b/ld/emultempl/aarch64elf.em
@@ -54,6 +54,10 @@ fragment <<EOF
EOF
fi
fragment <<EOF
+ link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
+ link_info.warn_execstack = DEFAULT_LD_WARN_EXECSTACK;
+ link_info.no_warn_rwx_segments = ! DEFAULT_LD_WARN_RWX_SEGMENTS;
+ link_info.default_execstack = DEFAULT_LD_EXECSTACK;
}
static void
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 885067f..8f5334d 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -67,6 +67,10 @@ fragment <<EOF
EOF
fi
fragment <<EOF
+ link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
+ link_info.warn_execstack = DEFAULT_LD_WARN_EXECSTACK;
+ link_info.no_warn_rwx_segments = ! DEFAULT_LD_WARN_RWX_SEGMENTS;
+ link_info.default_execstack = DEFAULT_LD_EXECSTACK;
}
static void
diff --git a/ld/emultempl/scoreelf.em b/ld/emultempl/scoreelf.em
index f5dd062..d781dd9 100644
--- a/ld/emultempl/scoreelf.em
+++ b/ld/emultempl/scoreelf.em
@@ -47,6 +47,10 @@ fragment <<EOF
EOF
fi
fragment <<EOF
+ link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
+ link_info.warn_execstack = DEFAULT_LD_WARN_EXECSTACK;
+ link_info.no_warn_rwx_segments = ! DEFAULT_LD_WARN_RWX_SEGMENTS;
+ link_info.default_execstack = DEFAULT_LD_EXECSTACK;
}
static void