summaryrefslogtreecommitdiff
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
commit4238e1746cba6748ccca628e310c78bf14e7386b (patch)
tree7690c5e32b947534e46b62725b208eef7410fdf1 /gas/config/tc-alpha.c
parentd3f786c8f323ca33e4b89c5bbf25200972cdfcf2 (diff)
downloadbinutils-redhat-4238e1746cba6748ccca628e310c78bf14e7386b.tar.gz
* 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 7b65354aef..0dc875b2cf 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;
}