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

Revert "setup.sh introduce isELFExec, isELFDyn" #69028

Merged
merged 1 commit into from Sep 21, 2019

Conversation

matthewbauer
Copy link
Member

This reverts commit e1b80a5.

This is broken in PIE (#68513). Best to not keep it in otherwise something
else will start using it.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

This reverts commit e1b80a5.

This is broken in PIE (NixOS#68513). Best to not keep it in until something
else starts using it.
@worldofpeace
Copy link
Contributor

@matthewbauer I think they're accurate. PIE's have e_type ET_DYN?

@matthewbauer
Copy link
Member Author

@matthewbauer I think they're accurate. PIE's have e_type ET_DYN?

Yes, ET_DYN is used apparently because it is relocatable:

https://stackoverflow.com/questions/34519521/why-does-gcc-create-a-shared-object-instead-of-an-executable-binary-according-to/34522357#34522357

It doesn't seem like there's a universal way to tell whether something is an ELF executable. Only heuristics, like "is the executable bit set", "is ET_EXEC in the header", and "does it have an interpreter". If all of those are true, it is almost certainly an executable, but plenty of executables have only one or two of those. Best to make custom functions for each use case.

@bjornfor
Copy link
Contributor

+1 for reverting.

@matthewbauer matthewbauer changed the base branch from staging to master September 21, 2019 03:26
@matthewbauer matthewbauer changed the base branch from master to staging September 21, 2019 03:26
@matthewbauer matthewbauer merged commit 8e9b98a into NixOS:staging Sep 21, 2019
@ofborg ofborg bot removed 6.topic: emacs 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell labels Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants