Skip to content

Improve the performance of detecting linux-musl platform by parsing ELF#315

Merged
nex3 merged 3 commits intosass:mainfrom
ntkme:elf
Aug 1, 2024
Merged

Improve the performance of detecting linux-musl platform by parsing ELF#315
nex3 merged 3 commits intosass:mainfrom
ntkme:elf

Conversation

@ntkme
Copy link
Contributor

@ntkme ntkme commented Jul 31, 2024

Closes #314

Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
@ntkme
Copy link
Contributor Author

ntkme commented Jul 31, 2024

I mostly reused the variable names from the linux kernel code: https://github.com/torvalds/linux/blob/HEAD/include/uapi/linux/elf.h. Idea here is for whoever going to work on this code they can refer to the kernel API document and find the reference without too much effort:

@nex3 Now I have renamed a few of them, and changed the snake case to camel case, let me know if you have any preferences on these naming.

@ntkme ntkme requested a review from nex3 July 31, 2024 21:48
@nex3
Copy link
Contributor

nex3 commented Jul 31, 2024

I think it's better to have explicit names than names that exactly match the kernel, especially since the explicit names are just expanded versions of the names from the kernel anyway so figuring out that they correspond won't be too hard for a reader. I'd also like to avoid single-letter affixes with unclear meaning like e, p, and z.

Copy link
Contributor

@nex3 nex3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nex3 nex3 merged commit 9b5f08b into sass:main Aug 1, 2024
@ntkme ntkme deleted the elf branch August 1, 2024 00:48
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.

More efficiently check for musl libc

2 participants