[PATCH] x86_64: push <symoffs> creates wrong relocation
Jan Beulich
JBeulich@novell.com
Mon Feb 28 16:04:00 GMT 2005
A suffixless push (as would the the general case with Intel syntax) with
its
operand being the address of a symbol generated an unsigned
(zero-extend)
relocation rather than a signed (sign-extend) one.
Built and tested on x86_64-unknown-linux-gnu.
Jan
gas/
2005-02-28 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (output_imm): Also set sign flag for 64-bit
push
immediates.
---
/home/jbeulich/src/binutils/mainline/2005-02-28/gas/config/tc-i386.c 2005-02-01
16:15:56.000000000 +0100
+++ 2005-02-28/gas/config/tc-i386.c 2005-02-28 15:16:27.055461488
+0100
@@ -3560,7 +3560,8 @@ output_imm (insn_start_frag, insn_start_
int sign = 0;
if ((i.types[n] & (Imm32S))
- && i.suffix == QWORD_MNEM_SUFFIX)
+ && (i.suffix == QWORD_MNEM_SUFFIX
+ || (!i.suffix && (i.tm.opcode_modifier &
No_lSuf))))
sign = 1;
if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
{
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-mainline-x86_64-push-symoffs.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20050228/91323472/attachment.ksh>
More information about the Binutils
mailing list