aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mep.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2009-08-12 03:40:48 +0000
committerDJ Delorie <dj@redhat.com>2009-08-12 03:40:48 +0000
commit85143216ca14d79b3e384a1bcb871890a8ac7659 (patch)
treeab2cb176ee4af924eb0d25107371ee5af205b5d6 /gas/config/tc-mep.c
parent4a9bf9e95388d0ce26fec1302c0d3120e9554646 (diff)
downloadfsf-binutils-gdb-85143216ca14d79b3e384a1bcb871890a8ac7659.zip
fsf-binutils-gdb-85143216ca14d79b3e384a1bcb871890a8ac7659.tar.gz
fsf-binutils-gdb-85143216ca14d79b3e384a1bcb871890a8ac7659.tar.bz2
* config/tc-mep.c (md_estimate_size_before_relax): Handle weak
symbols correctly. (md_convert_frag): Likewise. (md_pcrel_from_section): Likewise. (mep_force_relocation): Likewise.
Diffstat (limited to 'gas/config/tc-mep.c')
-rw-r--r--gas/config/tc-mep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c
index 4e3c874..511d968 100644
--- a/gas/config/tc-mep.c
+++ b/gas/config/tc-mep.c
@@ -1529,6 +1529,7 @@ md_estimate_size_before_relax (fragS * fragP, segT segment)
fragP->fr_subtype = insn_to_subtype (fragP->fr_cgen.insn->base->num);
if (S_GET_SEGMENT (fragP->fr_symbol) != segment
+ || S_IS_WEAK (fragP->fr_symbol)
#ifdef MEP_IVC2_SUPPORTED
|| (mep_cop == EF_MEP_COP_IVC2
&& bfd_get_section_flags (stdoutput, segment) & SEC_MEP_VLIW)
@@ -1764,6 +1765,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
}
if (S_GET_SEGMENT (fragP->fr_symbol) != seg
+ || S_IS_WEAK (fragP->fr_symbol)
|| operand == MEP_OPERAND_PCABS24A2)
{
gas_assert (fragP->fr_cgen.insn != 0);
@@ -1809,6 +1811,7 @@ md_pcrel_from_section (fixS *fixP, segT sec)
{
if (fixP->fx_addsy != (symbolS *) NULL
&& (! S_IS_DEFINED (fixP->fx_addsy)
+ || S_IS_WEAK (fixP->fx_addsy)
|| S_GET_SEGMENT (fixP->fx_addsy) != sec))
/* The symbol is undefined (or is defined but not in this section).
Let the linker figure it out. */
@@ -2013,6 +2016,9 @@ mep_force_relocation (fixS *fixp)
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 1;
+ if (generic_force_reloc (fixp))
+ return 1;
+
/* Allow branches to global symbols to be resolved at assembly time.
This is consistent with way relaxable branches are handled, since
branches to both global and local symbols are relaxed. It also