-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIC-safe assembly for xorgxrdp #68
Conversation
Thank you, it is indeed broken, I see why, and I’m working on a fix. |
We use ebp instead of ebx in code that uses it, but these were already using ebp so push/pop it around (after reviewing that ebx-now-inner-ebp is indeed reloaded in each y loop).
e13e8cb
to
c6f5030
Compare
@proski this new push should address both your legibility concerns and the crash issue (I tested on an actual i386 system) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much more readable now, thank you. I'll test it later.
%else | ||
; not ELF | ||
%ifdef PIC | ||
%error Position-Independent Code is currently only supported for ELF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please quote error messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even the nasm manual is inconsistent in whether they quote them, but if it pleases your eyes… sure.
c6f5030
to
f9a9a77
Compare
I was able to test the code on a 32-bit systems. The image is good. The test passes (after rebasing this PR onto the current devel branch). But I would prefer to have constant data in the |
I agree, and I will change it once I get more than a few minutes free time… :| I was ill for a while, and work piled up on the dayjob. |
… don’t call it there)
See neutrinolabs/librfxcodec#17 for ongoing discussion; these two PRs are linked. |
See also: #67
I believe the code to be correct, as the transformations were mechanical (even if done manually), and this compiles on Debian GNU/Linux on i386 just fine (Hurd and GNU/kFreeBSD are expected to follow).