Commit d856054b by Ilya Verbin Committed by Ilya Verbin

Set SECTION_EXCLUDE flag for LTO sections.

gcc/
	* configure: Regenerate.
	* configure.ac: Move the test for section attribute specifier "e" in GAS
	out to all i[34567]86-*-* | x86_64-*-* targets and add --fatal-warnings.
	* langhooks.c (lhd_begin_section): Set SECTION_EXCLUDE flag.
	* varasm.c (default_elf_asm_named_section): Guard SECTION_EXCLUDE with
	ifdef HAVE_GAS_SECTION_EXCLUDE.

From-SVN: r216442
parent e80f9fef
2014-10-19 Ilya Verbin <ilya.verbin@intel.com>
* configure: Regenerate.
* configure.ac: Move the test for section attribute specifier "e" in GAS
out to all i[34567]86-*-* | x86_64-*-* targets and add --fatal-warnings.
* langhooks.c (lhd_begin_section): Set SECTION_EXCLUDE flag.
* varasm.c (default_elf_asm_named_section): Guard SECTION_EXCLUDE with
ifdef HAVE_GAS_SECTION_EXCLUDE.
2014-10-19 Andreas Schwab <schwab@linux-m68k.org> 2014-10-19 Andreas Schwab <schwab@linux-m68k.org>
* doc/md.texi (RTL Template) [match_scratch]: Correct equivalent * doc/md.texi (RTL Template) [match_scratch]: Correct equivalent
...@@ -24676,9 +24676,12 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers ...@@ -24676,9 +24676,12 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers
;; ;;
esac esac
fi fi
# Test if the assembler supports the section flag 'e' for specifying ;;
# an excluded section. esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with e" >&5
# Test if the assembler supports the section flag 'e' for specifying
# an excluded section.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with e" >&5
$as_echo_n "checking assembler for .section with e... " >&6; } $as_echo_n "checking assembler for .section with e... " >&6; }
if test "${gcc_cv_as_section_has_e+set}" = set; then : if test "${gcc_cv_as_section_has_e+set}" = set; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
...@@ -24691,7 +24694,7 @@ fi ...@@ -24691,7 +24694,7 @@ fi
elif test x$gcc_cv_as != x; then elif test x$gcc_cv_as != x; then
$as_echo '.section foo1,"e" $as_echo '.section foo1,"e"
.byte 0,0,0,0' > conftest.s .byte 0,0,0,0' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
...@@ -24714,8 +24717,6 @@ cat >>confdefs.h <<_ACEOF ...@@ -24714,8 +24717,6 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi` #define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`
_ACEOF _ACEOF
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5
$as_echo_n "checking assembler for filds and fists mnemonics... " >&6; } $as_echo_n "checking assembler for filds and fists mnemonics... " >&6; }
......
...@@ -3799,18 +3799,19 @@ foo: nop ...@@ -3799,18 +3799,19 @@ foo: nop
;; ;;
esac esac
fi fi
# Test if the assembler supports the section flag 'e' for specifying
# an excluded section.
gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e,
[2,22,51],,
[.section foo1,"e"
.byte 0,0,0,0])
AC_DEFINE_UNQUOTED(HAVE_GAS_SECTION_EXCLUDE,
[`if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`],
[Define if your assembler supports specifying the section flag e.])
;; ;;
esac esac
# Test if the assembler supports the section flag 'e' for specifying
# an excluded section.
gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e,
[2,22,51], [--fatal-warnings],
[.section foo1,"e"
.byte 0,0,0,0])
AC_DEFINE_UNQUOTED(HAVE_GAS_SECTION_EXCLUDE,
[`if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`],
[Define if your assembler supports specifying the section flag e.])
gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], gcc_GAS_CHECK_FEATURE([filds and fists mnemonics],
gcc_cv_as_ix86_filds,,, gcc_cv_as_ix86_filds,,,
[filds mem; fists mem],, [filds mem; fists mem],,
......
...@@ -660,7 +660,7 @@ lhd_begin_section (const char *name) ...@@ -660,7 +660,7 @@ lhd_begin_section (const char *name)
saved_section = text_section; saved_section = text_section;
/* Create a new section and switch to it. */ /* Create a new section and switch to it. */
section = get_section (name, SECTION_DEBUG, NULL); section = get_section (name, SECTION_DEBUG | SECTION_EXCLUDE, NULL);
switch_to_section (section); switch_to_section (section);
} }
......
...@@ -6144,8 +6144,10 @@ default_elf_asm_named_section (const char *name, unsigned int flags, ...@@ -6144,8 +6144,10 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
if (!(flags & SECTION_DEBUG)) if (!(flags & SECTION_DEBUG))
*f++ = 'a'; *f++ = 'a';
#if defined (HAVE_GAS_SECTION_EXCLUDE) && HAVE_GAS_SECTION_EXCLUDE == 1
if (flags & SECTION_EXCLUDE) if (flags & SECTION_EXCLUDE)
*f++ = 'e'; *f++ = 'e';
#endif
if (flags & SECTION_WRITE) if (flags & SECTION_WRITE)
*f++ = 'w'; *f++ = 'w';
if (flags & SECTION_CODE) if (flags & SECTION_CODE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment