mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
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.
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -182,8 +182,6 @@ if { [check_gc_sections_available] && ![istarget "v850-*-*"] } {
|
||||
|
||||
proc target_defaults_to_execstack {} {
|
||||
if { [istarget "aarch64*-*-*"]
|
||||
|| [istarget "arm*-*-*"]
|
||||
|| [istarget "*-*-nacl"]
|
||||
|| [istarget "arc*-*-*"]
|
||||
|| [istarget "ia64*-*-*"]
|
||||
|| [istarget "nios2*-*-*"]
|
||||
|
Reference in New Issue
Block a user