Commit b0ddb385 by H.J. Lu Committed by H.J. Lu

Return false for common symbols in sdata_symbolic_operand

Although common symbols are defined in executables, they aren't in small
data section.  But a definition in small data section overrides a common
symbol, which still binds lcoally, and turns a reference to common symbol
to reference to small data section.  Even if ia64_in_small_data_p returns
true on common symbols, sdata_symbolic_operand must return false on common
symbols.  Common symbols are assumed to be placed in small data section,
but are accessed as if they are in normal data section so that they won't
cause any relocation overflow.

	PR target/65064
	* config/ia64/predicates.md (sdata_symbolic_operand): Return false
	for common symbols.

From-SVN: r220792
parent 2d64d38c
2015-02-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/65064
* config/ia64/predicates.md (sdata_symbolic_operand): Return false
for common symbols.
2015-02-18 Jakub Jelinek <jakub@redhat.com> 2015-02-18 Jakub Jelinek <jakub@redhat.com>
* config/i386/t-intelmic (mkoffload.o): Remove dependency on * config/i386/t-intelmic (mkoffload.o): Remove dependency on
......
...@@ -69,7 +69,12 @@ ...@@ -69,7 +69,12 @@
of constants here. */ of constants here. */
t = SYMBOL_REF_DECL (op); t = SYMBOL_REF_DECL (op);
if (DECL_P (t)) if (DECL_P (t))
t = DECL_SIZE_UNIT (t); {
/* Common symbol isn't placed in small data section. */
if (DECL_COMMON (t))
return false;
t = DECL_SIZE_UNIT (t);
}
else else
t = TYPE_SIZE_UNIT (TREE_TYPE (t)); t = TYPE_SIZE_UNIT (TREE_TYPE (t));
if (t && tree_fits_shwi_p (t)) if (t && tree_fits_shwi_p (t))
......
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