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

Not all ELF are for Linux #53

Closed
jasperla opened this issue Jan 13, 2023 · 2 comments
Closed

Not all ELF are for Linux #53

jasperla opened this issue Jan 13, 2023 · 2 comments

Comments

@jasperla
Copy link
Contributor

jasperla commented Jan 13, 2023

Currently all ELF files are classified as runnable:linux. Would it be possible to change this to runnable:elf unless platform-specific strings are matched?

Currently ELF files contain quite some information to aid in correctly tagging them:

  • ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), statically linked, no section header
  • ELF 32-bit LSB executable, Intel 80386, version 1 (Solaris), dynamically linked, interpreter /usr/lib/ld.so.1, not stripped
  • ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, for OpenBSD, stripped
  • ELF 32-bit LSB *unknown arch 0xa34* (NetBSD)

If this is a worthwhile direction I'd be happy to submit a PR.

@jasperla
Copy link
Contributor Author

jasperla commented Jan 13, 2023

It turns out the latter part which includes the operating system isn't included in the magic variable. So instead I've opted for the more generic runnable:elf in #55

@psrok1
Copy link
Member

psrok1 commented Jan 23, 2023

Good point, PR merged and will be included in v2.0.0 release. Thanks!

@psrok1 psrok1 closed this as completed Jan 23, 2023
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

2 participants