aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-alpha.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-09-19 16:13:38 +0000
committerRichard Henderson <rth@redhat.com>2002-09-19 16:13:38 +0000
commit021c2b5e4ba370c7818c09d1b85a105939fc6377 (patch)
tree4519e66a2fced92d9ada29716497babf5939ff2f /gas/config/tc-alpha.c
parent8d30a00d374d4cb00c6625eaa41ff1311b7b99bb (diff)
downloadgdb-021c2b5e4ba370c7818c09d1b85a105939fc6377.zip
gdb-021c2b5e4ba370c7818c09d1b85a105939fc6377.tar.gz
gdb-021c2b5e4ba370c7818c09d1b85a105939fc6377.tar.bz2
* config/tc-alpha.c (md_pcrel_from): Only adjust special for
branch type relocs. (alpha_force_relocation): Don't special-case branch type relocs. * gas/alpha/elf-reloc-7.s: New. * gas/alpha/elf-reloc-7.d: New. * gas/alpha/alpha.exp: Run it.
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r--gas/config/tc-alpha.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 7b65354..0dc875b 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -1139,12 +1139,12 @@ md_pcrel_from (fixP)
valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;
switch (fixP->fx_r_type)
{
- case BFD_RELOC_ALPHA_GPDISP:
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- return addr;
+ case BFD_RELOC_23_PCREL_S2:
+ case BFD_RELOC_ALPHA_HINT:
+ case BFD_RELOC_ALPHA_BRSGP:
+ return addr + 4;
default:
- return fixP->fx_size + addr;
+ return addr;
}
}
@@ -1501,10 +1501,6 @@ alpha_force_relocation (f)
case BFD_RELOC_ALPHA_TPREL16:
return 1;
- case BFD_RELOC_23_PCREL_S2:
- case BFD_RELOC_ALPHA_HINT:
- return 0;
-
default:
break;
}