diff options
author | Jan Hubicka <jh@suse.cz> | 2001-02-12 16:47:15 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2001-02-12 16:47:15 +0000 |
commit | 23df10780612d98ca2beed212e65680eb8d01c96 (patch) | |
tree | 178a224b4ad013b9fe1c838d07cbe7d035ffb54b /gas | |
parent | 76f227a511409df74d5e65573b7707970037b1ce (diff) | |
download | gdb-23df10780612d98ca2beed212e65680eb8d01c96.zip gdb-23df10780612d98ca2beed212e65680eb8d01c96.tar.gz gdb-23df10780612d98ca2beed212e65680eb8d01c96.tar.bz2 |
* elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
* tc-i386.c (i386_displacement): Fix handling of
BFD_RELOC_X86_64_GOTPCREL.
(i386_validate_fix): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 20 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 33d440a..5f73872 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Mon Feb 12 17:45:50 CET 2001 Jan Hubicka <jh@suse.cz> + + * tc-i386.c (i386_displacement): Fix handling of + BFD_RELOC_X86_64_GOTPCREL. + (i386_validate_fix): Likewise. + 2001-02-12 Philip Blundell <pb@futuretv.com> * config/tc-arm.c (do_ldst): Improve warnings for unpredictable diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index f1e7006..c6e288e 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -3436,7 +3436,10 @@ i386_displacement (disp_start, disp_end) assert (exp->X_op == O_symbol); exp->X_op = O_subtract; exp->X_op_symbol = GOT_symbol; - i.disp_reloc[this_operand] = BFD_RELOC_32; + if (i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) + i.disp_reloc[this_operand] = BFD_RELOC_32_PCREL; + else + i.disp_reloc[this_operand] = BFD_RELOC_32; } #endif @@ -4600,9 +4603,18 @@ i386_validate_fix (fixp) if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol) { /* GOTOFF relocation are nonsense in 64bit mode. */ - if (flag_code == CODE_64BIT) - abort (); - fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + if (fixp->fx_r_type == BFD_RELOC_32_PCREL) + { + if (flag_code != CODE_64BIT) + abort (); + fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL; + } + else + { + if (flag_code == CODE_64BIT) + abort (); + fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + } fixp->fx_subsy = 0; } } |