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

relocation for static variable when cross-compiled on OSX. #1

Open
Hiroshi123 opened this issue Feb 27, 2019 · 0 comments
Open

relocation for static variable when cross-compiled on OSX. #1

Hiroshi123 opened this issue Feb 27, 2019 · 0 comments

Comments

@Hiroshi123
Copy link
Owner

Static variable relocation will be done by filling distance between current instruction pointer and address where you stored data.
But it assumes compiler(in this case; llvm) generates proper instruction for it.
clang -target=x86_64-elf -fPIC -c on OSX will generate the code which will end up to fail after proper relocation on linker.
If the relocation process needs to insert or delete another instruction for it, it must exceed its own role.

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