diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-02-04 02:32:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-02-04 02:32:54 +0000 |
commit | fdb3408e128813c85c87be37200e930ae5300781 (patch) | |
tree | 6feb709e5f33bd7e7019f782f1312236ae55a0d6 /gas | |
parent | b2c416781dd5d8930561676c684655def96428be (diff) | |
download | gdb-fdb3408e128813c85c87be37200e930ae5300781.zip gdb-fdb3408e128813c85c87be37200e930ae5300781.tar.gz gdb-fdb3408e128813c85c87be37200e930ae5300781.tar.bz2 |
* config/tc-mips.c (md_apply_fix): If this is an undefined symbol,
subtract the value from fx_addnumber to since
bfd_perform_relocation is going to add it in.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 322fafa..305b19a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Thu Feb 3 21:29:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * config/tc-mips.c (md_apply_fix): If this is an undefined symbol, + subtract the value from fx_addnumber to since + bfd_perform_relocation is going to add it in. + Wed Feb 2 13:55:08 1994 Jeffrey A. Law (law@snake.cs.utah.edu) * Makefile.in: Avoid bug in losing hpux sed. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index d99f2a1..1305857 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -4750,6 +4750,14 @@ md_apply_fix (fixP, valueP) value = *valueP; fixP->fx_addnumber = value; /* Remember value for tc_gen_reloc */ + /* bfd_perform_relocation is going to add in the symbol value. If + this is an external symbol, it will have a non-zero value, but we + do not want to add in. Therefore, we subtract it out of + fx_addnumber. FIXME: relocations in gas are very confusing. */ + if (fixP->fx_addsy != (symbolS *) NULL + && fixP->fx_addsy->ecoff_undefined) + fixP->fx_addnumber -= S_GET_VALUE (fixP->fx_addsy); + switch (fixP->fx_r_type) { case BFD_RELOC_32: |