Reset x86 Linux targets to not compressing debug sections by default. Enable compression of debug sections by default in the linker, if so configured.
PR gas/19109 . * configure.ac: Note the 'none' is an acceptable argument to --enable-compressed-debug-sections. * configure: Regenerate. gas * configure.ac: Restore --enable-compressed-debug-sections. Do not enable compressed debug sections by default for x86 Linux targets. * configure: Regenerate. ld * configure.ac: Add --enable-compressed-debug-sections. * configure: Regenerate. * config.in: Regenerate. * ld.texinfo: Document how to determine the default action for debug sections. * ldmain.c (main): If DEFAULT_FLAG_COMPRESS_DEBUG is defined then set the compress_debug field of the link_info structure to zlib-gabi. * lexsup.c (elf_static_list_options): Output the default setting for the --compress-debug-sections option. * NEWS: Mention the new configure option.
This commit is contained in:
parent
4cd98a1920
commit
6c3bc0f82c
@ -1,3 +1,10 @@
|
|||||||
|
2015-10-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR gas/19109
|
||||||
|
* configure.ac: Note the 'none' is an acceptable argument to
|
||||||
|
--enable-compressed-debug-sections.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
|
2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR gas/19109
|
PR gas/19109
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -1477,7 +1477,7 @@ Optional Features:
|
|||||||
offload target compiler during the build
|
offload target compiler during the build
|
||||||
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
||||||
--enable-ld[=ARG] build ld [ARG={default,yes,no}]
|
--enable-ld[=ARG] build ld [ARG={default,yes,no}]
|
||||||
--enable-compressed-debug-sections={all,gas,gold,ld}
|
--enable-compressed-debug-sections={all,gas,gold,ld,none}
|
||||||
Enable compressed debug sections for gas, gold or ld
|
Enable compressed debug sections for gas, gold or ld
|
||||||
by default
|
by default
|
||||||
--disable-libquadmath do not build libquadmath directory
|
--disable-libquadmath do not build libquadmath directory
|
||||||
|
@ -397,7 +397,7 @@ esac
|
|||||||
# Decide the default method for compressing debug sections.
|
# Decide the default method for compressing debug sections.
|
||||||
# Provide a configure time option to override our default.
|
# Provide a configure time option to override our default.
|
||||||
AC_ARG_ENABLE(compressed_debug_sections,
|
AC_ARG_ENABLE(compressed_debug_sections,
|
||||||
[AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,gold,ld}],
|
[AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,gold,ld,none}],
|
||||||
[Enable compressed debug sections for gas, gold or ld by
|
[Enable compressed debug sections for gas, gold or ld by
|
||||||
default])],
|
default])],
|
||||||
[
|
[
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2015-10-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR gas/19109
|
||||||
|
* configure.ac: Restore --enable-compressed-debug-sections.
|
||||||
|
Do not enable compressed debug sections by default for x86 Linux
|
||||||
|
targets.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
|
2015-10-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR gas/19109
|
PR gas/19109
|
||||||
|
27
gas/configure
vendored
27
gas/configure
vendored
@ -764,6 +764,7 @@ enable_plugins
|
|||||||
enable_largefile
|
enable_largefile
|
||||||
enable_targets
|
enable_targets
|
||||||
enable_checking
|
enable_checking
|
||||||
|
enable_compressed_debug_sections
|
||||||
enable_werror
|
enable_werror
|
||||||
enable_build_warnings
|
enable_build_warnings
|
||||||
enable_nls
|
enable_nls
|
||||||
@ -1412,6 +1413,7 @@ Optional Features:
|
|||||||
--disable-largefile omit support for large files
|
--disable-largefile omit support for large files
|
||||||
--enable-targets alternative target configurations besides the primary
|
--enable-targets alternative target configurations besides the primary
|
||||||
--enable-checking enable run-time checks
|
--enable-checking enable run-time checks
|
||||||
|
--enable-compressed-debug-sections compress debug sections by default
|
||||||
--enable-werror treat compile warnings as errors
|
--enable-werror treat compile warnings as errors
|
||||||
--enable-build-warnings enable build-time compiler warnings
|
--enable-build-warnings enable build-time compiler warnings
|
||||||
--disable-nls do not use Native Language Support
|
--disable-nls do not use Native Language Support
|
||||||
@ -10969,7 +10971,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 10972 "configure"
|
#line 10974 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11075,7 +11077,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 11078 "configure"
|
#line 11080 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11664,6 +11666,19 @@ $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# PR gas/19109
|
||||||
|
# Decide the default method for compressing debug sections.
|
||||||
|
ac_default_compressed_debug_sections=unset
|
||||||
|
# Provide a configure time option to override our default.
|
||||||
|
# Check whether --enable-compressed_debug_sections was given.
|
||||||
|
if test "${enable_compressed_debug_sections+set}" = set; then :
|
||||||
|
enableval=$enable_compressed_debug_sections; case "${enableval}" in
|
||||||
|
yes | all | gas) ac_default_compressed_debug_sections=yes ;;
|
||||||
|
no | none) ac_default_compressed_debug_sections=no ;;
|
||||||
|
*) ac_default_compressed_debug_sections=unset ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
using_cgen=no
|
using_cgen=no
|
||||||
|
|
||||||
|
|
||||||
@ -12489,15 +12504,11 @@ _ACEOF
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# For x86 Linux targets, default to compressing debug sections unless
|
if test x$ac_default_compressed_debug_sections == xyes ; then
|
||||||
# configured otherwise.
|
|
||||||
case x${enable_compressed_debug_sections}-${target_cpu_type}-${target_os} in
|
|
||||||
x*gas*|xall*|x-i386-linux-gnu)
|
|
||||||
|
|
||||||
$as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h
|
$as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h
|
||||||
|
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
# Turn on all targets if possible
|
# Turn on all targets if possible
|
||||||
if test ${all_targets} = "yes"; then
|
if test ${all_targets} = "yes"; then
|
||||||
|
@ -64,6 +64,18 @@ if test x$ac_checking != x ; then
|
|||||||
AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
|
AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# PR gas/19109
|
||||||
|
# Decide the default method for compressing debug sections.
|
||||||
|
ac_default_compressed_debug_sections=unset
|
||||||
|
# Provide a configure time option to override our default.
|
||||||
|
AC_ARG_ENABLE(compressed_debug_sections,
|
||||||
|
[ --enable-compressed-debug-sections compress debug sections by default],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes | all | gas) ac_default_compressed_debug_sections=yes ;;
|
||||||
|
no | none) ac_default_compressed_debug_sections=no ;;
|
||||||
|
*) ac_default_compressed_debug_sections=unset ;;
|
||||||
|
esac])dnl
|
||||||
|
|
||||||
using_cgen=no
|
using_cgen=no
|
||||||
|
|
||||||
AM_BINUTILS_WARNINGS
|
AM_BINUTILS_WARNINGS
|
||||||
@ -536,14 +548,9 @@ changequote([,])dnl
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# For x86 Linux targets, default to compressing debug sections unless
|
if test x$ac_default_compressed_debug_sections == xyes ; then
|
||||||
# configured otherwise.
|
AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
|
||||||
case x${enable_compressed_debug_sections}-${target_cpu_type}-${target_os} in
|
fi
|
||||||
x*gas*|xall*|x-i386-linux-gnu)
|
|
||||||
AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1,
|
|
||||||
[Define if you want compressed debug sections by default.])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Turn on all targets if possible
|
# Turn on all targets if possible
|
||||||
if test ${all_targets} = "yes"; then
|
if test ${all_targets} = "yes"; then
|
||||||
|
15
ld/ChangeLog
15
ld/ChangeLog
@ -1,3 +1,18 @@
|
|||||||
|
2015-10-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR gas/19109
|
||||||
|
* configure.ac: Add --enable-compressed-debug-sections.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* config.in: Regenerate.
|
||||||
|
* ld.texinfo: Document how to determine the default action for
|
||||||
|
debug sections.
|
||||||
|
* ldmain.c (main): If DEFAULT_FLAG_COMPRESS_DEBUG is defined then
|
||||||
|
set the compress_debug field of the link_info structure to
|
||||||
|
zlib-gabi.
|
||||||
|
* lexsup.c (elf_static_list_options): Output the default setting
|
||||||
|
for the --compress-debug-sections option.
|
||||||
|
* NEWS: Mention the new configure option.
|
||||||
|
|
||||||
2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
|
2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* ld.texinfo: Fix a typo for "-z noextern-protected-data".
|
* ld.texinfo: Fix a typo for "-z noextern-protected-data".
|
||||||
|
3
ld/NEWS
3
ld/NEWS
@ -1,5 +1,8 @@
|
|||||||
-*- text -*-
|
-*- text -*-
|
||||||
|
|
||||||
|
* Add a configure option --enable-compressed-debug-sections={all,ld} to
|
||||||
|
decide whether DWARF debug sections should be compressed by default.
|
||||||
|
|
||||||
* Add support for the ARC EM/HS, and ARC600/700 architectures.
|
* Add support for the ARC EM/HS, and ARC600/700 architectures.
|
||||||
|
|
||||||
* Experimental support for linker garbage collection (--gc-sections)
|
* Experimental support for linker garbage collection (--gc-sections)
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#define __CONFIG_H__ 1
|
#define __CONFIG_H__ 1
|
||||||
|
|
||||||
|
/* Define if you want compressed debug sections by default. */
|
||||||
|
#undef DEFAULT_FLAG_COMPRESS_DEBUG
|
||||||
|
|
||||||
/* Define to 1 if translation of program messages to the user's native
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
language is requested. */
|
language is requested. */
|
||||||
#undef ENABLE_NLS
|
#undef ENABLE_NLS
|
||||||
|
25
ld/configure
vendored
25
ld/configure
vendored
@ -788,6 +788,7 @@ enable_64_bit_bfd
|
|||||||
with_sysroot
|
with_sysroot
|
||||||
enable_gold
|
enable_gold
|
||||||
enable_got
|
enable_got
|
||||||
|
enable_compressed_debug_sections
|
||||||
enable_werror
|
enable_werror
|
||||||
enable_build_warnings
|
enable_build_warnings
|
||||||
enable_nls
|
enable_nls
|
||||||
@ -1444,6 +1445,7 @@ Optional Features:
|
|||||||
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
||||||
--enable-got=<type> GOT handling scheme (target, single, negative,
|
--enable-got=<type> GOT handling scheme (target, single, negative,
|
||||||
multigot)
|
multigot)
|
||||||
|
--enable-compressed-debug-sections compress debug sections by default
|
||||||
--enable-werror treat compile warnings as errors
|
--enable-werror treat compile warnings as errors
|
||||||
--enable-build-warnings enable build-time compiler warnings
|
--enable-build-warnings enable build-time compiler warnings
|
||||||
--disable-nls do not use Native Language Support
|
--disable-nls do not use Native Language Support
|
||||||
@ -11713,7 +11715,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 11716 "configure"
|
#line 11718 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -11819,7 +11821,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 11822 "configure"
|
#line 11824 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -15521,6 +15523,19 @@ $as_echo "#define GOT_HANDLING_DEFAULT GOT_HANDLING_MULTIGOT" >>confdefs.h
|
|||||||
*) as_fn_error "bad value ${got_handling} for --enable-got option" "$LINENO" 5 ;;
|
*) as_fn_error "bad value ${got_handling} for --enable-got option" "$LINENO" 5 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# PR gas/19109
|
||||||
|
# Decide the default method for compressing debug sections.
|
||||||
|
ac_default_compressed_debug_sections=unset
|
||||||
|
# Provide a configure time option to override our default.
|
||||||
|
# Check whether --enable-compressed_debug_sections was given.
|
||||||
|
if test "${enable_compressed_debug_sections+set}" = set; then :
|
||||||
|
enableval=$enable_compressed_debug_sections; case "${enableval}" in
|
||||||
|
yes | all | ld) ac_default_compressed_debug_sections=yes ;;
|
||||||
|
no | none) ac_default_compressed_debug_sections=no ;;
|
||||||
|
*) ac_default_compressed_debug_sections=unset ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set the 'development' global.
|
# Set the 'development' global.
|
||||||
. $srcdir/../bfd/development.sh
|
. $srcdir/../bfd/development.sh
|
||||||
@ -17118,6 +17133,12 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test x$ac_default_compressed_debug_sections == xyes ; then
|
||||||
|
|
||||||
|
$as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,6 +143,18 @@ case "${got_handling}" in
|
|||||||
*) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;;
|
*) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# PR gas/19109
|
||||||
|
# Decide the default method for compressing debug sections.
|
||||||
|
ac_default_compressed_debug_sections=unset
|
||||||
|
# Provide a configure time option to override our default.
|
||||||
|
AC_ARG_ENABLE(compressed_debug_sections,
|
||||||
|
[ --enable-compressed-debug-sections compress debug sections by default],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes | all | ld) ac_default_compressed_debug_sections=yes ;;
|
||||||
|
no | none) ac_default_compressed_debug_sections=no ;;
|
||||||
|
*) ac_default_compressed_debug_sections=unset ;;
|
||||||
|
esac])dnl
|
||||||
|
|
||||||
AM_BINUTILS_WARNINGS
|
AM_BINUTILS_WARNINGS
|
||||||
|
|
||||||
AM_LC_MESSAGES
|
AM_LC_MESSAGES
|
||||||
@ -372,6 +384,10 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test x$ac_default_compressed_debug_sections == xyes ; then
|
||||||
|
AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(elf_list_options)
|
AC_SUBST(elf_list_options)
|
||||||
AC_SUBST(elf_shlib_list_options)
|
AC_SUBST(elf_shlib_list_options)
|
||||||
AC_SUBST(elf_plt_unwind_list_options)
|
AC_SUBST(elf_plt_unwind_list_options)
|
||||||
|
@ -2275,6 +2275,9 @@ sections and rename debug section names to begin with @samp{.zdebug}
|
|||||||
instead of @samp{.debug}. @option{--compress-debug-sections=zlib}
|
instead of @samp{.debug}. @option{--compress-debug-sections=zlib}
|
||||||
and @option{--compress-debug-sections=zlib-gabi}
|
and @option{--compress-debug-sections=zlib-gabi}
|
||||||
compress DWARF debug sections with SHF_COMPRESSED from the ELF ABI.
|
compress DWARF debug sections with SHF_COMPRESSED from the ELF ABI.
|
||||||
|
The default behaviour varies depending upon the target involved and
|
||||||
|
the configure options used to build the toolchain. The default can be
|
||||||
|
determined by examing the output from the linker's @option{--help} option.
|
||||||
|
|
||||||
@kindex --reduce-memory-overheads
|
@kindex --reduce-memory-overheads
|
||||||
@item --reduce-memory-overheads
|
@item --reduce-memory-overheads
|
||||||
|
@ -281,6 +281,9 @@ main (int argc, char **argv)
|
|||||||
link_info.pei386_auto_import = -1;
|
link_info.pei386_auto_import = -1;
|
||||||
link_info.spare_dynamic_tags = 5;
|
link_info.spare_dynamic_tags = 5;
|
||||||
link_info.path_separator = ':';
|
link_info.path_separator = ':';
|
||||||
|
#ifdef DEFAULT_FLAG_COMPRESS_DEBUG
|
||||||
|
link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
|
||||||
|
#endif
|
||||||
|
|
||||||
ldfile_add_arch ("");
|
ldfile_add_arch ("");
|
||||||
emulation = get_emulation (argc, argv);
|
emulation = get_emulation (argc, argv);
|
||||||
|
@ -1756,6 +1756,13 @@ elf_static_list_options (FILE *file)
|
|||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
--compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]\n\
|
--compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]\n\
|
||||||
Compress DWARF debug sections using zlib\n"));
|
Compress DWARF debug sections using zlib\n"));
|
||||||
|
#ifdef DEFAULT_FLAG_COMPRESS_DEBUG
|
||||||
|
fprintf (file, _("\
|
||||||
|
Default: zlib-gabi\n"));
|
||||||
|
#else
|
||||||
|
fprintf (file, _("\
|
||||||
|
Default: none\n"));
|
||||||
|
#endif
|
||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
-z common-page-size=SIZE Set common page size to SIZE\n"));
|
-z common-page-size=SIZE Set common page size to SIZE\n"));
|
||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user