[Rpm-maint] [rpm-software-management/rpm] elfdeps: Generate dependencies on non-executable shared libraries (#1393)

Panu Matilainen notifications at github.com
Mon Oct 12 07:35:17 UTC 2020


After consulting the dog [*]:

The problem here is that we're trying to classify a hermaphrodite entity into one of two sexes. ET_EXEC is clear, but ET_DYN can be either an executable, a dynamic shared library *or both*. Until we embrace this fact, we'll get it wrong half of the time. 

So we need to stop trying to decide what *it is* and instead ask it what it's *capable of*, and act accordingly.
libmagic doesn't know nearly enough to handle this, so the logic needs to live inside elfdeps or we need to enhance the classifier somehow (wouldn't be a bad thing at all but perhaps out of scope here). Which means a split on the .attr level likely isn't going to be meaningful.

If we want to preserve the behavior where executables can disable dependency generation by stripping x, we need to come up with a new way of defining an executable. Given the nature of modern ELF, I think the only meaningful way is to draw the line at: regardless of it's possible other capabilities, does it do something if executed? Which AIUI in technical terms comes down to: does it have PT_INTERP? elfdeps looks that info up as it is, but it's not wired in a meaningful way at the moment.

[*] A running joke in the team, walking the dog has proven to be an excellent way of problem solving, but this only really holds for our older dog, called Wizard :smile:

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1393#issuecomment-706936121
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201012/e681d668/attachment.html>


More information about the Rpm-maint mailing list