diff options
author | Richard Henderson <rth@redhat.com> | 2010-09-20 16:09:03 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2010-09-20 16:09:03 +0000 |
commit | bc1bc43fdc18de229ed2cdfa853811a6ed603caf (patch) | |
tree | 6f63df143d4a44e99f64da93c476d9e24b2ed87d /gas | |
parent | 79c077509f32b19b6a16728a9afb7b42a8d3dc27 (diff) | |
download | gdb-bc1bc43fdc18de229ed2cdfa853811a6ed603caf.zip gdb-bc1bc43fdc18de229ed2cdfa853811a6ed603caf.tar.gz gdb-bc1bc43fdc18de229ed2cdfa853811a6ed603caf.tar.bz2 |
Use bfd_elf_generic_reloc for alpha-elf.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-alpha.c | 20 |
2 files changed, 9 insertions, 16 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 416b1fe..34c77ea 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2010-09-20 Richard Henderson <rth@redhat.com> + + * config/tc-alpha.c (tc_gen_reloc): Remove hack around + bfd_perform_reloc for OBJ_ELF. + 2010-09-17 Tejas Belagod <tejas.belagod@arm.com> * config/tc-arm.c (do_t_ldmstm): Add logic to handle single-register diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index bd0a44f..d1de6f9 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -6269,26 +6269,14 @@ tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED, gas_assert (!fixp->fx_pcrel == !reloc->howto->pc_relative); + reloc->addend = fixp->fx_offset; + #ifdef OBJ_ECOFF + /* Fake out bfd_perform_relocation. sigh. */ + /* ??? Better would be to use the special_function hook. */ if (fixp->fx_r_type == BFD_RELOC_ALPHA_LITERAL) - /* Fake out bfd_perform_relocation. sigh. */ reloc->addend = -alpha_gp_value; - else -#endif - { - reloc->addend = fixp->fx_offset; -#ifdef OBJ_ELF - /* Ohhh, this is ugly. The problem is that if this is a local global - symbol, the relocation will entirely be performed at link time, not - at assembly time. bfd_perform_reloc doesn't know about this sort - of thing, and as a result we need to fake it out here. */ - if ((S_IS_EXTERNAL (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy) - || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE) - || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_THREAD_LOCAL)) - && !S_IS_COMMON (fixp->fx_addsy)) - reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value; #endif - } #ifdef OBJ_EVAX switch (fixp->fx_r_type) |