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