diff options
author | Alan Modra <amodra@gmail.com> | 2000-09-28 06:24:43 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-09-28 06:24:43 +0000 |
commit | 27df9f40e4e03e65859c6450b8c81a58efaabeea (patch) | |
tree | e8047235437e59146e57c787fa9a7c3c8864dbdf | |
parent | fa6b9313b51c68d1ebd1007d97bca95ee3a1d47d (diff) | |
download | fsf-binutils-gdb-27df9f40e4e03e65859c6450b8c81a58efaabeea.zip fsf-binutils-gdb-27df9f40e4e03e65859c6450b8c81a58efaabeea.tar.gz fsf-binutils-gdb-27df9f40e4e03e65859c6450b8c81a58efaabeea.tar.bz2 |
For SOM, don't force relocs on out-of-range 12 bit branches.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-hppa.c | 17 |
2 files changed, 19 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 44d501d..3b248b5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2000-09-28 Alan Modra <alan@linuxcare.com.au> + * config/tc-hppa.c (hppa_force_relocation): If OBJ_SOM, don't + force relocs for 12 bit branches. + (md_apply_fix): Similarly, adjust logic here. + +2000-09-28 Alan Modra <alan@linuxcare.com.au> + * config/tc-hppa.c (md_apply_fix): Add fmt assertion. Don't adjust for external and weak syms as we will use a reloc. Allow for +8 offset when calculating limits of branches. diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index f03333d..75f5b57 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -4419,9 +4419,15 @@ md_apply_fix (fixP, valp) && fixP->fx_pcrel && !arg_reloc_stub_needed (symbol_arg_reloc_info (fixP->fx_addsy), hppa_fixP->fx_arg_reloc) - && ((*valp - 8 + 8192) < 16384 - || (fmt == 17 && (*valp - 8 + 262144) < 524288) - || (fmt == 22 && (*valp - 8 + 8388608) < 16777216)) +#ifdef OBJ_ELF + && (*valp - 8 + 8192 < 16384 + || (fmt == 17 && *valp - 8 + 262144 < 524288) + || (fmt == 22 && *valp - 8 + 8388608 < 16777216)) +#endif +#ifdef OBJ_SOM + && (*valp - 8 + 262144 < 524288 + || (fmt == 22 && *valp - 8 + 8388608 < 16777216)) +#endif && !S_IS_EXTERNAL (fixP->fx_addsy) && !S_IS_WEAK (fixP->fx_addsy) && S_GET_SEGMENT (fixP->fx_addsy) == hppa_fixP->segment @@ -8449,7 +8455,10 @@ hppa_force_relocation (fixp) - md_pcrel_from (fixp) - 8); if (distance + 8388608 >= 16777216 || (hppa_fixp->fx_r_format == 17 && distance + 262144 >= 524288) - || (hppa_fixp->fx_r_format == 12 && distance + 8192 >= 16384)) +#ifdef OBJ_ELF + || (hppa_fixp->fx_r_format == 12 && distance + 8192 >= 16384) +#endif + ) return 1; } |