aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-02-06 05:34:34 +0000
committerAlexandre Oliva <aoliva@redhat.com>2002-02-06 05:34:34 +0000
commitac3f04d7f1675e0b9e86265226541df58a763357 (patch)
treeb393993cfe5e7495ca7f35ddbabc9374b48648a7 /gas/config/tc-sh.c
parent6af4589cb640e634712fdb8e9d1478d0d265173c (diff)
downloadgdb-ac3f04d7f1675e0b9e86265226541df58a763357.zip
gdb-ac3f04d7f1675e0b9e86265226541df58a763357.tar.gz
gdb-ac3f04d7f1675e0b9e86265226541df58a763357.tar.bz2
* config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
assume fixP->fx_subsy is non-NULL.
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r--gas/config/tc-sh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index ce780a1..b266b80 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -2975,7 +2975,9 @@ md_apply_fix3 (fixP, valP, seg)
/* Make the jump instruction point to the address of the operand. At
runtime we merely add the offset to the actual PLT entry. */
* valP = 0xfffffffc;
- val = fixP->fx_addnumber - S_GET_VALUE (fixP->fx_subsy);
+ val = fixP->fx_addnumber;
+ if (fixP->fx_subsy)
+ val -= S_GET_VALUE (fixP->fx_subsy);
md_number_to_chars (buf, val, 4);
break;