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

/elf-dt-gnu-hash ELF: better symbol lookup via DT_GNU_HASH #2

Open
flapenguin opened this issue Mar 29, 2020 · 1 comment
Open

/elf-dt-gnu-hash ELF: better symbol lookup via DT_GNU_HASH #2

flapenguin opened this issue Mar 29, 2020 · 1 comment

Comments

@flapenguin
Copy link
Owner

@flapenguin flapenguin commented Mar 29, 2020

https://flapenguin.me/elf-dt-gnu-hash

@flapenguin
Copy link
Owner Author

@flapenguin flapenguin commented Mar 29, 2020

Comments from Disqus:

Pavan Thursday, March 22, 2018 2:28 PM
Awesome articals ..

but one quick doubt.
Is your Code compiled? because I see you have

void* hashtab and then try dereference that .. I think in that case you should get the error:

void value not ignored as it ought to be

(I've fixed that, but forgot to reply in Disqus)


Mojes Thursday, January 31, 2019 12:00 PM
Thanks for great article. It helped me a lot.

One thing that took me a day to find is that you should change:
while (chain[ix - symoffset] & 1 == 0) ix++;
to:
while ((chain[ix - symoffset] & 1) == 0) ix++;

C/C++ operator precedence bounds comparison operator tighter than bitwise AND operator. Your version will be optimize out because it's equivalent to while (chain[ix - symoffset] & fasle) ix++;

(I've fixed that, but forgot to reply in Disqus)

@flapenguin flapenguin changed the title ELF: better symbol lookup via DT_GNU_HASH /elf-dt-hash ELF: better symbol lookup via DT_GNU_HASH Jun 27, 2022
@flapenguin flapenguin changed the title /elf-dt-hash ELF: better symbol lookup via DT_GNU_HASH /elf-dt-gnu-hash ELF: better symbol lookup via DT_GNU_HASH Jun 27, 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