Bug 6161 – iasm opcode family Jcc use absolute address instead of relative for functions
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2011-06-15T12:03:00Z
Last change time
2017-07-07T12:54:47Z
Keywords
iasm
Assigned to
nobody
Creator
govellius
Comments
Comment #0 by govellius — 2011-06-15T12:03:23Z
I would like some clarification for the following code:
//-----
module test;
void main() { asm
{
naked;
jz Target;
}}
void Target() { asm
{
naked;
inc EAX;
ret;
}}
//-----
Looking at "objdump -drM intel test":
4177fc: 0f 84 04 78 41 00 je 82f006 <_end+0x1f7966>
The absolute value is being used instead of the relative address, I believe the correct output should be:
4177fc: 0f 84 02 00 00 00 je 417804 <_D4test6TargetFZi>