forked from Imagelibrary/binutils-gdb
Default to disabling the linker warnings about execstack and RWX segments if the target is the HPPA architecture.
PR 29263 * configure.ac (ac_default_ld_warn_execstack): Default to 'no' for HPPA targets. (ac_default_ld_warn_rwx_segments): Likewise. * configure: Regenerate. * testsuite/ld-elf/elf.exp: Add the --warn-execstack command line option to the command line when running execstack tests for the HPPA target.
This commit is contained in:
11
ld/ChangeLog
11
ld/ChangeLog
@@ -1,3 +1,14 @@
|
|||||||
|
2022-06-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 29263
|
||||||
|
* configure.ac (ac_default_ld_warn_execstack): Default to 'no' for
|
||||||
|
HPPA targets.
|
||||||
|
(ac_default_ld_warn_rwx_segments): Likewise.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* testsuite/ld-elf/elf.exp: Add the --warn-execstack command line
|
||||||
|
option to the command line when running execstack tests for the
|
||||||
|
HPPA target.
|
||||||
|
|
||||||
2022-05-12 Alan Modra <amodra@gmail.com>
|
2022-05-12 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 29006
|
PR 29006
|
||||||
|
|||||||
235
ld/configure
vendored
235
ld/configure
vendored
@@ -727,7 +727,6 @@ am__nodep
|
|||||||
AMDEPBACKSLASH
|
AMDEPBACKSLASH
|
||||||
AMDEP_FALSE
|
AMDEP_FALSE
|
||||||
AMDEP_TRUE
|
AMDEP_TRUE
|
||||||
am__quote
|
|
||||||
am__include
|
am__include
|
||||||
DEPDIR
|
DEPDIR
|
||||||
OBJEXT
|
OBJEXT
|
||||||
@@ -744,6 +743,9 @@ AM_BACKSLASH
|
|||||||
AM_DEFAULT_VERBOSITY
|
AM_DEFAULT_VERBOSITY
|
||||||
AM_DEFAULT_V
|
AM_DEFAULT_V
|
||||||
AM_V
|
AM_V
|
||||||
|
CSCOPE
|
||||||
|
ETAGS
|
||||||
|
CTAGS
|
||||||
am__untar
|
am__untar
|
||||||
am__tar
|
am__tar
|
||||||
AMTAR
|
AMTAR
|
||||||
@@ -816,7 +818,8 @@ PACKAGE_VERSION
|
|||||||
PACKAGE_TARNAME
|
PACKAGE_TARNAME
|
||||||
PACKAGE_NAME
|
PACKAGE_NAME
|
||||||
PATH_SEPARATOR
|
PATH_SEPARATOR
|
||||||
SHELL'
|
SHELL
|
||||||
|
am__quote'
|
||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
ac_user_opts='
|
ac_user_opts='
|
||||||
enable_option_checking
|
enable_option_checking
|
||||||
@@ -2859,7 +2862,7 @@ test -n "$target_alias" &&
|
|||||||
program_prefix=${target_alias}-
|
program_prefix=${target_alias}-
|
||||||
|
|
||||||
|
|
||||||
am__api_version='1.15'
|
am__api_version='1.16'
|
||||||
|
|
||||||
# Find a good install program. We prefer a C program (faster),
|
# Find a good install program. We prefer a C program (faster),
|
||||||
# so one script is as good as another. But avoid the broken or
|
# so one script is as good as another. But avoid the broken or
|
||||||
@@ -3035,12 +3038,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
|
|||||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||||
|
|
||||||
if test x"${MISSING+set}" != xset; then
|
if test x"${MISSING+set}" != xset; then
|
||||||
case $am_aux_dir in
|
MISSING="\${SHELL} '$am_aux_dir/missing'"
|
||||||
*\ * | *\ *)
|
|
||||||
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
|
||||||
*)
|
|
||||||
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
# Use eval to expand $SHELL
|
# Use eval to expand $SHELL
|
||||||
if eval "$MISSING --is-lightweight"; then
|
if eval "$MISSING --is-lightweight"; then
|
||||||
@@ -3375,8 +3373,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
|
|||||||
|
|
||||||
# For better backward compatibility. To be removed once Automake 1.9.x
|
# For better backward compatibility. To be removed once Automake 1.9.x
|
||||||
# dies out for good. For more background, see:
|
# dies out for good. For more background, see:
|
||||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||||
mkdir_p='$(MKDIR_P)'
|
mkdir_p='$(MKDIR_P)'
|
||||||
|
|
||||||
# We need awk for the "check" target (and possibly the TAP driver). The
|
# We need awk for the "check" target (and possibly the TAP driver). The
|
||||||
@@ -3395,6 +3393,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Variables for tags utilities; see am/tags.am
|
||||||
|
if test -z "$CTAGS"; then
|
||||||
|
CTAGS=ctags
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$ETAGS"; then
|
||||||
|
ETAGS=etags
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$CSCOPE"; then
|
||||||
|
CSCOPE=cscope
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# POSIX will say in a future version that running "rm -f" with no argument
|
# POSIX will say in a future version that running "rm -f" with no argument
|
||||||
# is OK; and we want to be able to make that assumption in our Makefile
|
# is OK; and we want to be able to make that assumption in our Makefile
|
||||||
@@ -3427,7 +3439,7 @@ END
|
|||||||
Aborting the configuration process, to ensure you take notice of the issue.
|
Aborting the configuration process, to ensure you take notice of the issue.
|
||||||
|
|
||||||
You can download and install GNU coreutils to get an 'rm' implementation
|
You can download and install GNU coreutils to get an 'rm' implementation
|
||||||
that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
that behaves properly: <https://www.gnu.org/software/coreutils/>.
|
||||||
|
|
||||||
If you want to complete the configuration process using your problematic
|
If you want to complete the configuration process using your problematic
|
||||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||||
@@ -4352,45 +4364,45 @@ DEPDIR="${am__leading_dot}deps"
|
|||||||
|
|
||||||
ac_config_commands="$ac_config_commands depfiles"
|
ac_config_commands="$ac_config_commands depfiles"
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
|
||||||
am_make=${MAKE-make}
|
$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
|
||||||
cat > confinc << 'END'
|
cat > confinc.mk << 'END'
|
||||||
am__doit:
|
am__doit:
|
||||||
@echo this is the am__doit target
|
@echo this is the am__doit target >confinc.out
|
||||||
.PHONY: am__doit
|
.PHONY: am__doit
|
||||||
END
|
END
|
||||||
# If we don't find an include directive, just comment out the code.
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
|
|
||||||
$as_echo_n "checking for style of include used by $am_make... " >&6; }
|
|
||||||
am__include="#"
|
am__include="#"
|
||||||
am__quote=
|
am__quote=
|
||||||
_am_result=none
|
# BSD make does it like this.
|
||||||
# First try GNU make style include.
|
echo '.include "confinc.mk" # ignored' > confmf.BSD
|
||||||
echo "include confinc" > confmf
|
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
|
||||||
# Ignore all kinds of additional output from 'make'.
|
echo 'include confinc.mk # ignored' > confmf.GNU
|
||||||
case `$am_make -s -f confmf 2> /dev/null` in #(
|
_am_result=no
|
||||||
*the\ am__doit\ target*)
|
for s in GNU BSD; do
|
||||||
am__include=include
|
{ echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
|
||||||
am__quote=
|
(${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
|
||||||
_am_result=GNU
|
ac_status=$?
|
||||||
;;
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
esac
|
(exit $ac_status); }
|
||||||
# Now try BSD make style include.
|
case $?:`cat confinc.out 2>/dev/null` in #(
|
||||||
if test "$am__include" = "#"; then
|
'0:this is the am__doit target') :
|
||||||
echo '.include "confinc"' > confmf
|
case $s in #(
|
||||||
case `$am_make -s -f confmf 2> /dev/null` in #(
|
BSD) :
|
||||||
*the\ am__doit\ target*)
|
am__include='.include' am__quote='"' ;; #(
|
||||||
am__include=.include
|
*) :
|
||||||
am__quote="\""
|
am__include='include' am__quote='' ;;
|
||||||
_am_result=BSD
|
esac ;; #(
|
||||||
|
*) :
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
if test "$am__include" != "#"; then
|
||||||
|
_am_result="yes ($s style)"
|
||||||
|
break
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
|
fi
|
||||||
$as_echo "$_am_result" >&6; }
|
done
|
||||||
rm -f confinc confmf
|
rm -f confinc.* confmf.*
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
|
||||||
|
$as_echo "${_am_result}" >&6; }
|
||||||
|
|
||||||
# Check whether --enable-dependency-tracking was given.
|
# Check whether --enable-dependency-tracking was given.
|
||||||
if test "${enable_dependency_tracking+set}" = set; then :
|
if test "${enable_dependency_tracking+set}" = set; then :
|
||||||
@@ -11491,7 +11503,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11494 "configure"
|
#line 11506 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@@ -11597,7 +11609,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11600 "configure"
|
#line 11612 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@@ -15461,7 +15473,12 @@ fi
|
|||||||
|
|
||||||
# By default warn when an executable stack is created due to object files
|
# By default warn when an executable stack is created due to object files
|
||||||
# requesting such, not when the user specifies -z execstack.
|
# requesting such, not when the user specifies -z execstack.
|
||||||
ac_default_ld_warn_execstack=2
|
case "${target}" in
|
||||||
|
# The HPPA port needs to support older kernels that use executable stacks
|
||||||
|
# for signals and syscalls.
|
||||||
|
hppa*-*-*) ac_default_ld_warn_execstack=0 ;;
|
||||||
|
*) ac_default_ld_warn_execstack=2 ;;
|
||||||
|
esac
|
||||||
# Check whether --enable-warn-execstack was given.
|
# Check whether --enable-warn-execstack was given.
|
||||||
if test "${enable_warn_execstack+set}" = set; then :
|
if test "${enable_warn_execstack+set}" = set; then :
|
||||||
enableval=$enable_warn_execstack; case "${enableval}" in
|
enableval=$enable_warn_execstack; case "${enableval}" in
|
||||||
@@ -17272,7 +17289,12 @@ _ACEOF
|
|||||||
|
|
||||||
|
|
||||||
if test "${ac_default_ld_warn_rwx_segments}" = unset; then
|
if test "${ac_default_ld_warn_rwx_segments}" = unset; then
|
||||||
ac_default_ld_warn_rwx_segments=1
|
case "${target}" in
|
||||||
|
# The HPPA's PLT section uses a constructed trampoline, hence it needs to
|
||||||
|
# have a RWX segment.
|
||||||
|
hppa*-*-*) ac_default_ld_warn_rwx_segments=0 ;;
|
||||||
|
*) ac_default_ld_warn_rwx_segments=1 ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -18118,7 +18140,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
|||||||
#
|
#
|
||||||
# INIT-COMMANDS
|
# INIT-COMMANDS
|
||||||
#
|
#
|
||||||
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
|
AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
|
||||||
|
|
||||||
|
|
||||||
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
||||||
@@ -19102,29 +19124,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
|
|||||||
# Older Autoconf quotes --file arguments for eval, but not when files
|
# Older Autoconf quotes --file arguments for eval, but not when files
|
||||||
# are listed without --file. Let's play safe and only enable the eval
|
# are listed without --file. Let's play safe and only enable the eval
|
||||||
# if we detect the quoting.
|
# if we detect the quoting.
|
||||||
case $CONFIG_FILES in
|
# TODO: see whether this extra hack can be removed once we start
|
||||||
*\'*) eval set x "$CONFIG_FILES" ;;
|
# requiring Autoconf 2.70 or later.
|
||||||
*) set x $CONFIG_FILES ;;
|
case $CONFIG_FILES in #(
|
||||||
esac
|
*\'*) :
|
||||||
|
eval set x "$CONFIG_FILES" ;; #(
|
||||||
|
*) :
|
||||||
|
set x $CONFIG_FILES ;; #(
|
||||||
|
*) :
|
||||||
|
;;
|
||||||
|
esac
|
||||||
shift
|
shift
|
||||||
for mf
|
# Used to flag and report bootstrapping failures.
|
||||||
|
am_rc=0
|
||||||
|
for am_mf
|
||||||
do
|
do
|
||||||
# Strip MF so we end up with the name of the file.
|
# Strip MF so we end up with the name of the file.
|
||||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
|
||||||
# Check whether this is an Automake generated Makefile or not.
|
# Check whether this is an Automake generated Makefile which includes
|
||||||
# We used to match only the files named 'Makefile.in', but
|
# dependency-tracking related rules and includes.
|
||||||
# some people rename them; so instead we look at the file content.
|
# Grep'ing the whole file directly is not great: AIX grep has a line
|
||||||
# Grep'ing the first line is not enough: some people post-process
|
|
||||||
# each Makefile.in and add a new line on top of each file to say so.
|
|
||||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
|
||||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|
||||||
dirpart=`$as_dirname -- "$mf" ||
|
|| continue
|
||||||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
am_dirpart=`$as_dirname -- "$am_mf" ||
|
||||||
X"$mf" : 'X\(//\)[^/]' \| \
|
$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
X"$mf" : 'X\(//\)$' \| \
|
X"$am_mf" : 'X\(//\)[^/]' \| \
|
||||||
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
|
X"$am_mf" : 'X\(//\)$' \| \
|
||||||
$as_echo X"$mf" |
|
X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
$as_echo X"$am_mf" |
|
||||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
s//\1/
|
s//\1/
|
||||||
q
|
q
|
||||||
@@ -19142,53 +19170,50 @@ $as_echo X"$mf" |
|
|||||||
q
|
q
|
||||||
}
|
}
|
||||||
s/.*/./; q'`
|
s/.*/./; q'`
|
||||||
else
|
am_filepart=`$as_basename -- "$am_mf" ||
|
||||||
continue
|
$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
|
||||||
fi
|
X"$am_mf" : 'X\(//\)$' \| \
|
||||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
# from the Makefile without running 'make'.
|
$as_echo X/"$am_mf" |
|
||||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
sed '/^.*\/\([^/][^/]*\)\/*$/{
|
||||||
test -z "$DEPDIR" && continue
|
|
||||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
|
||||||
test -z "$am__include" && continue
|
|
||||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
|
||||||
# Find all dependency output files, they are included files with
|
|
||||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
|
||||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
|
||||||
# expansion.
|
|
||||||
for file in `sed -n "
|
|
||||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
|
||||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
|
|
||||||
# Make sure the directory exists.
|
|
||||||
test -f "$dirpart/$file" && continue
|
|
||||||
fdir=`$as_dirname -- "$file" ||
|
|
||||||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
|
||||||
X"$file" : 'X\(//\)[^/]' \| \
|
|
||||||
X"$file" : 'X\(//\)$' \| \
|
|
||||||
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
|
|
||||||
$as_echo X"$file" |
|
|
||||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
|
||||||
s//\1/
|
s//\1/
|
||||||
q
|
q
|
||||||
}
|
}
|
||||||
/^X\(\/\/\)[^/].*/{
|
/^X\/\(\/\/\)$/{
|
||||||
s//\1/
|
s//\1/
|
||||||
q
|
q
|
||||||
}
|
}
|
||||||
/^X\(\/\/\)$/{
|
/^X\/\(\/\).*/{
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\).*/{
|
|
||||||
s//\1/
|
s//\1/
|
||||||
q
|
q
|
||||||
}
|
}
|
||||||
s/.*/./; q'`
|
s/.*/./; q'`
|
||||||
as_dir=$dirpart/$fdir; as_fn_mkdir_p
|
{ echo "$as_me:$LINENO: cd "$am_dirpart" \
|
||||||
# echo "creating $dirpart/$file"
|
&& sed -e '/# am--include-marker/d' "$am_filepart" \
|
||||||
echo '# dummy' > "$dirpart/$file"
|
| $MAKE -f - am--depfiles" >&5
|
||||||
done
|
(cd "$am_dirpart" \
|
||||||
|
&& sed -e '/# am--include-marker/d' "$am_filepart" \
|
||||||
|
| $MAKE -f - am--depfiles) >&5 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } || am_rc=$?
|
||||||
done
|
done
|
||||||
|
if test $am_rc -ne 0; then
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
|
as_fn_error $? "Something went wrong bootstrapping makefile fragments
|
||||||
|
for automatic dependency tracking. If GNU make was not used, consider
|
||||||
|
re-running the configure script with MAKE=\"gmake\" (or whatever is
|
||||||
|
necessary). You can also try re-running configure with the
|
||||||
|
'--disable-dependency-tracking' option to at least be able to build
|
||||||
|
the package (albeit without support for automatic dependency tracking).
|
||||||
|
See \`config.log' for more details" "$LINENO" 5; }
|
||||||
|
fi
|
||||||
|
{ am_dirpart=; unset am_dirpart;}
|
||||||
|
{ am_filepart=; unset am_filepart;}
|
||||||
|
{ am_mf=; unset am_mf;}
|
||||||
|
{ am_rc=; unset am_rc;}
|
||||||
|
rm -f conftest-deps.mk
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
"libtool":C)
|
"libtool":C)
|
||||||
|
|||||||
@@ -206,7 +206,12 @@ esac])
|
|||||||
|
|
||||||
# By default warn when an executable stack is created due to object files
|
# By default warn when an executable stack is created due to object files
|
||||||
# requesting such, not when the user specifies -z execstack.
|
# requesting such, not when the user specifies -z execstack.
|
||||||
ac_default_ld_warn_execstack=2
|
[case "${target}" in
|
||||||
|
# The HPPA port needs to support older kernels that use executable stacks
|
||||||
|
# for signals and syscalls.
|
||||||
|
hppa*-*-*) ac_default_ld_warn_execstack=0 ;;
|
||||||
|
*) ac_default_ld_warn_execstack=2 ;;
|
||||||
|
esac]
|
||||||
AC_ARG_ENABLE(warn-execstack,
|
AC_ARG_ENABLE(warn-execstack,
|
||||||
AS_HELP_STRING([--enable-warn-execstack],
|
AS_HELP_STRING([--enable-warn-execstack],
|
||||||
[enable warnings when creating an executable stack]),
|
[enable warnings when creating an executable stack]),
|
||||||
@@ -564,7 +569,12 @@ AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_EXECSTACK,
|
|||||||
[Define to 1 if you want to enable --warn-execstack in ELF linker by default.])
|
[Define to 1 if you want to enable --warn-execstack in ELF linker by default.])
|
||||||
|
|
||||||
if test "${ac_default_ld_warn_rwx_segments}" = unset; then
|
if test "${ac_default_ld_warn_rwx_segments}" = unset; then
|
||||||
ac_default_ld_warn_rwx_segments=1
|
[case "${target}" in
|
||||||
|
# The HPPA's PLT section uses a constructed trampoline, hence it needs to
|
||||||
|
# have a RWX segment.
|
||||||
|
hppa*-*-*) ac_default_ld_warn_rwx_segments=0 ;;
|
||||||
|
*) ac_default_ld_warn_rwx_segments=1 ;;
|
||||||
|
esac]
|
||||||
fi
|
fi
|
||||||
AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_RWX_SEGMENTS,
|
AC_DEFINE_UNQUOTED(DEFAULT_LD_WARN_RWX_SEGMENTS,
|
||||||
$ac_default_ld_warn_rwx_segments,
|
$ac_default_ld_warn_rwx_segments,
|
||||||
|
|||||||
@@ -236,10 +236,19 @@ if { [istarget *-*-*linux*]
|
|||||||
proc prune_warnings_extra { text } {
|
proc prune_warnings_extra { text } {
|
||||||
return $text
|
return $text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The HPPA target disables the warnings by default since it needs an
|
||||||
|
# executable stack to support older kernels and an RWX segment to
|
||||||
|
# support its PLT.
|
||||||
|
if { [istarget "hppa*-*-*"] } {
|
||||||
|
set extra_link_opts "--warn-execstack --warn-rwx-segments"
|
||||||
|
} else {
|
||||||
|
set extra_link_opts ""
|
||||||
|
}
|
||||||
|
|
||||||
run_ld_link_tests [list \
|
run_ld_link_tests [list \
|
||||||
[list "PR ld/29072 (warn about an executable .note.GNU-stack)" \
|
[list "PR ld/29072 (warn about an executable .note.GNU-stack)" \
|
||||||
"-e 0" \
|
"-e 0 $extra_link_opts" \
|
||||||
"" \
|
"" \
|
||||||
"" \
|
"" \
|
||||||
{pr29072-a.s} \
|
{pr29072-a.s} \
|
||||||
|
|||||||
Reference in New Issue
Block a user