* config/tc-xtensa.c (xg_symbolic_immeds_fit): Do not relax calls to ...
authorBob Wilson <bob.wilson@acm.org>
Wed, 12 Dec 2007 21:16:47 +0000 (21:16 +0000)
committerBob Wilson <bob.wilson@acm.org>
Wed, 12 Dec 2007 21:16:47 +0000 (21:16 +0000)
gas/ChangeLog
gas/config/tc-xtensa.c

index 8b6c8cdf6d904e6b2495e5afb8ce592c9cefdc16..2bd13f2b4ad88f6e1fdd2e4b39a2502e8a61d6ac 100644 (file)
@@ -1,3 +1,7 @@
+2007-12-12  Bob Wilson  <bob.wilson@acm.org>
+
+       * config/tc-xtensa.c (xg_symbolic_immeds_fit): Do not relax calls to            weak symbols if longcalls are disabled.
+
 2007-12-11  Sterling Augustine  <sterling@tensilica.com>
            Bob Wilson  <bob.wilson@acm.org>
        
index 699eb7c5ce5e462acc438b128edff70532ca4168..051f79fd6f893a6060f0a92fd83def1186f65e12 100644 (file)
@@ -3235,23 +3235,19 @@ xg_symbolic_immeds_fit (const TInsn *insn,
              || xtensa_operand_is_PCrelative (isa, insn->opcode, i) == 0)
            return FALSE;
 
-         /* If it is a weak symbol, then assume it won't reach.  */
-         if (S_IS_WEAK (expr->X_add_symbol))
-           return FALSE;
-
-         if (is_direct_call_opcode (insn->opcode)
-             && ! pc_frag->tc_frag_data.use_longcalls)
+         /* If it is a weak symbol or a symbol in a different section,
+            it cannot be known to fit at assembly time.  */
+         if (S_IS_WEAK (expr->X_add_symbol)
+             || S_GET_SEGMENT (expr->X_add_symbol) != pc_seg)
            {
-             /* If callee is undefined or in a different segment, be
-                optimistic and assume it will be in range.  */
-             if (S_GET_SEGMENT (expr->X_add_symbol) != pc_seg)
+             /* For a direct call with --no-longcalls, be optimistic and
+                assume it will be in range.  */
+             if (is_direct_call_opcode (insn->opcode)
+                 && ! pc_frag->tc_frag_data.use_longcalls)
                return TRUE;
-           }
 
-         /* Only references within a segment can be known to fit in the
-            operands at assembly time.  */
-         if (S_GET_SEGMENT (expr->X_add_symbol) != pc_seg)
-           return FALSE;
+             return FALSE;
+           }
 
          symbolP = expr->X_add_symbol;
          sym_frag = symbol_get_frag (symbolP);
This page took 0.035501 seconds and 4 git commands to generate.