Skip to content
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

Adjust script for patching glibc 2.27 #1

Closed
wants to merge 1 commit into from

Conversation

bartekb81
Copy link

Arch upgraded to glibc 2.27, the old qldv does not work anymore (noticible when using swift-bin).

Current implementation of version checks is here: https://github.com/bminor/glibc/blob/glibc-2.27/elf/dl-version.c and it's different from 2.26. I adjusted the script accordingly:

  • 10129: the verbose parameter lands via esi in [rsp+0x48],
  • 103e0: value from [rsp+0x48] lands in edx - this is the line that I replace with xor edx, edx and a few nops

old:

   103e0:	8b 54 24 48          	mov    edx,DWORD PTR [rsp+0x48]

new:

103e0:	31 d2                	xor    edx,edx
103e2:	90                   	nop
103e3:	90                   	nop

@refi64
Copy link
Owner

refi64 commented Apr 28, 2018

Thanks for the heads up!

That being said, this solution isn't really ideal. The core problem seems to more be that we're changing the wrong test; there's a test instruction immediately following the mov that seems to be the proper one.

I have a fix, but I have to test it under Flatpak first. Should be ready later today...

@refi64
Copy link
Owner

refi64 commented Apr 28, 2018

Ok, it should be fixed now, and the new package is up on AUR.

@refi64 refi64 closed this Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants