[Nasm-bugs] [Bug 3392797] Invalid addressing mode with "rel" simply disregards rel

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sun Apr 17 15:33:20 PDT 2022


https://bugzilla.nasm.us/show_bug.cgi?id=3392797

Liam Bowen <liambowen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |liambowen at gmail.com

--- Comment #1 from Liam Bowen <liambowen at gmail.com> ---
Here is a reprex:

save as main.asm:
========================================
section .text
rel_bug:
        mov rdi, 1
        lea rbx, [rel values + rdi * 8]

non_rel:
        mov rdi, 1
        lea rbx, [values + rdi * 8]

section .data
        values dq 1, 2

========================================

Then run:

nasm -Wall -f elf64 main.asm
objdump -S -M intel main.o

You will see that rel_bug and non_rel are identical instructions

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list