[Nasm-bugs] [Bug 3392468] NASM 2.13.02 breaks macho64 .data fixups
no-reply at bugzilla-nasm.gorcunov.org
no-reply at bugzilla-nasm.gorcunov.org
Fri Mar 2 07:50:32 PST 2018
https://bugzilla.nasm.us/show_bug.cgi?id=3392468
ig <glucksmann at avast.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |glucksmann at avast.com
--- Comment #3 from ig <glucksmann at avast.com> ---
We had a similar problem (mach-o code jumping to weird locations when using
jump tables) even with 2.13.03, downgrading to 2.13.01 fixed it.
I can't provide a simple working PoC (don't even have a Mac to try it on), but
in general the code looked like this (multiple subsequent versions of the same
function generated with a macro):
%macro FUNCTION 1 ; parameter is SSE/AVX version to use
; ...
lea r9, [%%_JumpTable]
mov rdx, [r9 + 8*rbp]
jmp rdx
; ...
%%_Label1:
; ...
%%_Label2:
; ...
%%_Label3:
; ...
%%_Label4:
; ...
SECTION .rodata align=64
align 8, db 0
%%_JumpTable:
dq %%_Label1
dq %%_Label2
dq %%_Label3
dq %%_Label4
SECTION .text align=64
%endmacro
--
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