aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m68k.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-09-09 10:48:17 +0000
committerNick Clifton <nickc@redhat.com>2010-09-09 10:48:17 +0000
commit33f0727fc32e4b650ada8554d40c48694abb2532 (patch)
tree0b38c39e68613bb31cd123729bb00038b9f91825 /gas/config/tc-m68k.c
parent7587572432005b127202edd73a115f73eefa6b91 (diff)
downloadgdb-33f0727fc32e4b650ada8554d40c48694abb2532.zip
gdb-33f0727fc32e4b650ada8554d40c48694abb2532.tar.gz
gdb-33f0727fc32e4b650ada8554d40c48694abb2532.tar.bz2
* gas/config/tc-m68k.c (tc_gen_reloc): Handle references to defined
weak symbols first if generating an a.out object.
Diffstat (limited to 'gas/config/tc-m68k.c')
-rw-r--r--gas/config/tc-m68k.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 20852f8..9822b4a 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -1335,12 +1335,10 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
#ifndef OBJ_ELF
- if (fixp->fx_pcrel)
- reloc->addend = fixp->fx_addnumber;
- else if (OUTPUT_FLAVOR == bfd_target_aout_flavour
- && fixp->fx_addsy
- && S_IS_WEAK (fixp->fx_addsy)
- && ! bfd_is_und_section (S_GET_SEGMENT (fixp->fx_addsy)))
+ if (OUTPUT_FLAVOR == bfd_target_aout_flavour
+ && fixp->fx_addsy
+ && S_IS_WEAK (fixp->fx_addsy)
+ && ! bfd_is_und_section (S_GET_SEGMENT (fixp->fx_addsy)))
{
/* PR gas/3041 References to weak symbols must be treated as extern
in order to be overridable by the linker, even if they are defined
@@ -1364,6 +1362,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
- (S_GET_VALUE (fixp->fx_addsy)
+ S_GET_SEGMENT (fixp->fx_addsy)->vma);
}
+ else if (fixp->fx_pcrel)
+ reloc->addend = fixp->fx_addnumber;
else
reloc->addend = 0;
#else