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

Support redirecting unexported local symbols. #71

Closed
taviso opened this issue Jun 3, 2022 · 1 comment
Closed

Support redirecting unexported local symbols. #71

taviso opened this issue Jun 3, 2022 · 1 comment

Comments

@taviso
Copy link
Owner

taviso commented Jun 3, 2022

coffsyrup cannot currently undefine local symbols, but there's no reason why it can't. The main problem is there are no relocs, so existing callers will still call the old function. There is an easy solution:

  • undefine the symbol
  • replace the first instruction with jmp [undefined symbol]

Now we provide a replacement, and the linker will just fix it up for us.

@taviso
Copy link
Owner Author

taviso commented Jun 6, 2022

I have a patch that seems to work, but it's kinda hacky, hopefully it doesn't break anything.

@taviso taviso closed this as completed in 7f9f7df Jun 6, 2022
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

No branches or pull requests

1 participant