[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
'objdump' disagrees with 'gas' about 'ljmp' and 'lcall' (x86_64)
From: |
Allan B. Cruse |
Subject: |
'objdump' disagrees with 'gas' about 'ljmp' and 'lcall' (x86_64) |
Date: |
Tue, 2 Jan 2007 12:33:47 -0800 (PST) |
//-------------------------------------------------------------------
// example1.s 'ljmp' versus 'ljmpq' inconsistency
//
// This code-fragment assembled without any error-messages.
// $ as example1.s -o example1.o
//
// The objdump utility disassembled this 'ljmp' instruction
// as 'ljmpq *0x0', but when the 'ljmpq' mnemonic-opcode is
// actually used in a source-file, the assembler issues the
// message: "Error: suffix or operands invalid for 'ljmp'"
// $ as example2.s -o example2.o
//
// This apparent inconsistency was confusing to me, and may
// perhaps not be what was intended by binutils developers.
//
// programmer: ALLAN CRUSE
// written on: 02 JAN 2007
.code64
ljmp *destination
destination: .long 0, 0x10
.end
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// example2.s
.code64
ljmpq *destination
destination: .long 0, 0x10 # <---- changing '.long' to '.quad'
# did not resolve the inconsistency
.end
//-------------------------------------------------------------------
NOTE: I am using binutils version 2.17 on a x86_64 kernel 2.6.17.6.
(This same inconsistency also appeared with 'lcall' and 'lcallq'.)
//-------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 'objdump' disagrees with 'gas' about 'ljmp' and 'lcall' (x86_64),
Allan B. Cruse <=