aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-alpha.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2010-09-20 16:09:03 +0000
committerRichard Henderson <rth@redhat.com>2010-09-20 16:09:03 +0000
commitbc1bc43fdc18de229ed2cdfa853811a6ed603caf (patch)
tree6f63df143d4a44e99f64da93c476d9e24b2ed87d /gas/config/tc-alpha.c
parent79c077509f32b19b6a16728a9afb7b42a8d3dc27 (diff)
downloadgdb-bc1bc43fdc18de229ed2cdfa853811a6ed603caf.zip
gdb-bc1bc43fdc18de229ed2cdfa853811a6ed603caf.tar.gz
gdb-bc1bc43fdc18de229ed2cdfa853811a6ed603caf.tar.bz2
Use bfd_elf_generic_reloc for alpha-elf.
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r--gas/config/tc-alpha.c20
1 files changed, 4 insertions, 16 deletions
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)