[<prev] [next>] [day] [month] [year] [list]
Message-ID: <97819315-bdbd-147a-f178-71860f00679b@lwfinger.net>
Date: Sun, 13 Nov 2022 21:34:27 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: LKML <linux-kernel@...r.kernel.org>
Subject: Help with YASM
Hi,
I am the openSUSE maintainer for VirtualBox. A portion of the code is written in
yasm assembler. There are two sections of the code that refer to external
globals that now need to be referenced in a position-independent manner. After
much web searching, I have not found a method that works.
The first code snippet is a jump to an external location. The original code is
jmp NAME(dtrace_probe)
Based on a reference that I found, I changed this to
jmp [rel dtrace_probe wrt ..got]
This compiles without error, but I have no idea if it would work.
The second reference to an external variable is
lea T2, [NAME(g_afParity) wrt rip]
Trying to emulate the above change, I replaced this with
lea T2, [rel NAME(g_afParity) wrt rip ..got]
This one generates a compile error that there is a missing "]".
Thanks for any help, or pointers to reference works that I can read.
Larry
Powered by blists - more mailing lists