* Help with YASM
@ 2022-11-14 3:34 Larry Finger
0 siblings, 0 replies; only message in thread
From: Larry Finger @ 2022-11-14 3:34 UTC (permalink / raw)
To: LKML
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-14 3:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 3:34 Help with YASM Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).