diff options
author | Bob Wilson <bob.wilson@acm.org> | 2007-12-12 21:16:47 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@acm.org> | 2007-12-12 21:16:47 +0000 |
commit | 8e6bc631a97c9cbf7b267b02bac14ffbc928b723 (patch) | |
tree | 41fb25813f375674694043005643960ac59922ac /gas | |
parent | c46082c8d595fcaa9e6df24e7dee18de6bc33354 (diff) | |
download | gdb-8e6bc631a97c9cbf7b267b02bac14ffbc928b723.zip gdb-8e6bc631a97c9cbf7b267b02bac14ffbc928b723.tar.gz gdb-8e6bc631a97c9cbf7b267b02bac14ffbc928b723.tar.bz2 |
* config/tc-xtensa.c (xg_symbolic_immeds_fit): Do not relax calls to weak symbols if longcalls are disabled.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-xtensa.c | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8b6c8cd..2bd13f2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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> diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 699eb7c..051f79f 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -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); |