Commit 5d4856a0 by Rainer Orth Committed by Rainer Orth

configure.in (HAVE_GAS_SHF_MERGE): Always define to test result.

	* configure.in (HAVE_GAS_SHF_MERGE): Always define to test result.
	Update description.
	* configure: Regenerate.
	* config.in: Likewise.
	* dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Test for
	HAVE_GAS_SHF_MERGE value.
	* varasm.c (mergeable_string_section): Likewise.
	(mergeable_constant_section): Likewise.

From-SVN: r71691
parent 5748beec
2003-09-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in (HAVE_GAS_SHF_MERGE): Always define to test result.
Update description.
* configure: Regenerate.
* config.in: Likewise.
* dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Test for
HAVE_GAS_SHF_MERGE value.
* varasm.c (mergeable_string_section): Likewise.
(mergeable_constant_section): Likewise.
2003-09-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* except.h (MUST_USE_SJLJ_EXCEPTIONS): Test for DWARF2_UNWIND_INFO
value.
......
......@@ -453,7 +453,7 @@
/* Define if your assembler mis-optimizes .eh_frame data. */
#undef USE_AS_TRADITIONAL_FORMAT
/* Define if your assembler supports marking sections with SHF_MERGE flag. */
/* Define 0/1 if your assembler supports marking sections with SHF_MERGE flag. */
#undef HAVE_GAS_SHF_MERGE
/* Define if your assembler supports thread-local storage. */
......
......@@ -1977,9 +1977,10 @@ fi
gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge,
[elf,2,12,0], [--fatal-warnings],
[.section .rodata.str, "aMS", @progbits, 1],,
[AC_DEFINE(HAVE_GAS_SHF_MERGE, 1,
[Define if your assembler supports marking sections with SHF_MERGE flag.])])
[.section .rodata.str, "aMS", @progbits, 1])
AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE,
[`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`],
[Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.])
# Thread-local storage - the check is heavily parametrized.
conftest_s=
......
......@@ -3812,14 +3812,10 @@ static int maybe_emit_file (int);
#endif
/* Section flags for .debug_str section. */
#ifdef HAVE_GAS_SHF_MERGE
#define DEBUG_STR_SECTION_FLAGS \
(flag_merge_constants \
(HAVE_GAS_SHF_MERGE && flag_merge_constants \
? SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1 \
: SECTION_DEBUG)
#else
#define DEBUG_STR_SECTION_FLAGS SECTION_DEBUG
#endif
/* Labels we insert at beginning sections we can reference instead of
the section names themselves. */
......
......@@ -561,8 +561,7 @@ mergeable_string_section (tree decl ATTRIBUTE_UNUSED,
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED,
unsigned int flags ATTRIBUTE_UNUSED)
{
#ifdef HAVE_GAS_SHF_MERGE
if (flag_merge_constants
if (HAVE_GAS_SHF_MERGE && flag_merge_constants
&& TREE_CODE (decl) == STRING_CST
&& TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
&& align <= 256
......@@ -624,7 +623,7 @@ mergeable_string_section (tree decl ATTRIBUTE_UNUSED,
}
}
}
#endif
readonly_data_section ();
}
......@@ -635,10 +634,9 @@ mergeable_constant_section (enum machine_mode mode ATTRIBUTE_UNUSED,
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED,
unsigned int flags ATTRIBUTE_UNUSED)
{
#ifdef HAVE_GAS_SHF_MERGE
unsigned int modesize = GET_MODE_BITSIZE (mode);
if (flag_merge_constants
if (HAVE_GAS_SHF_MERGE && flag_merge_constants
&& mode != VOIDmode
&& mode != BLKmode
&& modesize <= align
......@@ -653,7 +651,7 @@ mergeable_constant_section (enum machine_mode mode ATTRIBUTE_UNUSED,
named_section_flags (name, flags);
return;
}
#endif
readonly_data_section ();
}
......
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