}
/* Create .sframe section for .plt section. */
- if (!info->no_ld_generated_unwind_info)
+ if (!info->no_ld_sframe_info)
{
flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY
}
/* .sframe sections are emitted for AMD64 ABI only. */
- if (ABI_64_P (info->output_bfd) && !info->no_ld_generated_unwind_info)
+ if (ABI_64_P (info->output_bfd) && !info->no_ld_sframe_info)
{
flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY
linker created sections, TRUE if it should be omitted. */
unsigned int no_ld_generated_unwind_info: 1;
+ /* TRUE if no .sframe stack trace info should be generated for the output.
+ This includes linker generated SFrame info as well. */
+ unsigned int no_ld_sframe_info: 1;
+
/* TRUE if BFD should generate a "task linked" object file,
similar to relocatable but also with globals converted to
statics. */
ELF_CFLAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
- -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
+ -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
+ -DELF_SFRAME_LIST_OPTIONS=@elf_sframe_list_options@
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
dvidir = @dvidir@
elf_list_options = @elf_list_options@
elf_plt_unwind_list_options = @elf_plt_unwind_list_options@
+elf_sframe_list_options = @elf_sframe_list_options@
elf_shlib_list_options = @elf_shlib_list_options@
enable_initfini_array = @enable_initfini_array@
enable_libctf = @enable_libctf@
ZLIBINC = @zlibinc@
ELF_CFLAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
- -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
+ -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
+ -DELF_SFRAME_LIST_OPTIONS=@elf_sframe_list_options@
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
EMULATION_OFILES
TDIRS
EMUL
+elf_sframe_list_options
elf_plt_unwind_list_options
elf_shlib_list_options
elf_list_options
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11896 "configure"
+#line 11897 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12002 "configure"
+#line 12003 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
elf_list_options=false
elf_shlib_list_options=false
elf_plt_unwind_list_options=false
+elf_sframe_list_options=false
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
if test "$targ_alias" = "all"; then
elf_list_options=true
elf_shlib_list_options=true
elf_plt_unwind_list_options=true
+ elf_sframe_list_options=true
else
# Canonicalize the secondary target names.
result=`$ac_config_sub $targ_alias 2>/dev/null`
if test x${PLT_UNWIND} = xyes; then
elf_plt_unwind_list_options=true
fi
+ if test x${SFRAME_INFO} = xyes; then
+ elf_sframe_list_options=true
+ fi
fi
;;
esac
+
if test x${all_targets} = xtrue; then
if test x${have_64_bit_bfd} = xyes; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
elf_list_options=false
elf_shlib_list_options=false
elf_plt_unwind_list_options=false
+elf_sframe_list_options=false
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
if test "$targ_alias" = "all"; then
elf_list_options=true
elf_shlib_list_options=true
elf_plt_unwind_list_options=true
+ elf_sframe_list_options=true
else
# Canonicalize the secondary target names.
result=`$ac_config_sub $targ_alias 2>/dev/null`
if test x${PLT_UNWIND} = xyes; then
elf_plt_unwind_list_options=true
fi
+ if test x${SFRAME_INFO} = xyes; then
+ elf_sframe_list_options=true
+ fi
fi
;;
esac
AC_SUBST(elf_list_options)
AC_SUBST(elf_shlib_list_options)
AC_SUBST(elf_plt_unwind_list_options)
+AC_SUBST(elf_sframe_list_options)
AC_SUBST(EMUL)
AC_SUBST(TDIRS)
+source_sh ${srcdir}/emulparams/sframe_info.sh
source_sh ${srcdir}/emulparams/dt-relr.sh
ARCH=aarch64
+source_sh ${srcdir}/emulparams/sframe_info.sh
source_sh ${srcdir}/emulparams/dt-relr.sh
ARCH=aarch64
source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/sframe_info.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-s390"
source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/sframe_info.sh
source_sh ${srcdir}/emulparams/extern_protected_data.sh
source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
source_sh ${srcdir}/emulparams/reloc_overflow.sh
--- /dev/null
+SFRAME_INFO=yes
+
+PARSE_AND_LIST_LONGOPTS_SFRAME='
+ {"no-sframe-info", no_argument, NULL,
+ OPTION_NO_LD_SFRAME_INFO},
+'
+
+PARSE_AND_LIST_ARGS_CASES_SFRAME='
+ case OPTION_NO_LD_SFRAME_INFO:
+ link_info.no_ld_sframe_info = true;
+ break;
+'
+
+PARSE_AND_LIST_LONGOPTS="$PARSE_AND_LIST_LONGOPTS $PARSE_AND_LIST_LONGOPTS_SFRAME"
+PARSE_AND_LIST_ARGS_CASES="$PARSE_AND_LIST_ARGS_CASES $PARSE_AND_LIST_ARGS_CASES_SFRAME"
/* Used by emulparams/plt_unwind.sh. */
OPTION_LD_GENERATED_UNWIND_INFO,
OPTION_NO_LD_GENERATED_UNWIND_INFO,
+ /* Used by emulparams/sframe_info.sh. */
+ OPTION_NO_LD_SFRAME_INFO,
/* Used by emultempl/aarch64elf.em. */
OPTION_FIX_ERRATUM_835769,
OPTION_FIX_ERRATUM_843419,
}
static void
-ld_list_options (FILE *file, bool elf, bool shlib, bool plt_unwind)
+elf_sframe_list_options (FILE *file)
+{
+ fprintf (file, _("\
+ --no-sframe-info Don't generate SFrame stack trace info in output\n"));
+}
+
+static void
+ld_list_options (FILE *file, bool elf, bool shlib, bool plt_unwind,
+ bool sframe_info)
{
if (!elf)
return;
printf (_("ELF emulations:\n"));
if (plt_unwind)
elf_plt_unwind_list_options (file);
+ if (sframe_info)
+ elf_sframe_list_options (file);
elf_static_list_options (file);
if (shlib)
elf_shlib_list_options (file);
/* xgettext:c-format */
printf (_("%s: emulation specific options:\n"), program_name);
ld_list_options (stdout, ELF_LIST_OPTIONS, ELF_SHLIB_LIST_OPTIONS,
- ELF_PLT_UNWIND_LIST_OPTIONS);
+ ELF_PLT_UNWIND_LIST_OPTIONS,
+ ELF_SFRAME_LIST_OPTIONS);
ldemul_list_emulation_options (stdout);
printf ("\n");