| Summary: | patchelf inflates filesize and causes performance problems | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Richard Purdie <richard.purdie> | ||||
| Component: | devtools / tool chain | Assignee: | Stephano Cetola <stephano> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher, randy.macleod | ||||
| Version: | 2.2 | ||||||
| Target Milestone: | 2.3 M3 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Bug Depends on: | 11123 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Richard Purdie
2017-02-02 17:27:48 UTC
I think the fix here is to store the hole size and location, then call a function from writeFile that uses lseek, at least that's my running theory. A couple questions: 1. Why are we producing binary executables with the e_type set to DYN? 2. PatchELF is working around a kernel bug, but doesn't mention the actual bug it is working around. Any ideas, or shall I assume that is a rabbit hole? (In reply to comment #1) > I think the fix here is to store the hole size and location, then call a > function from writeFile that uses lseek, at least that's my running theory. > A couple questions: > > 1. Why are we producing binary executables with the e_type set to DYN? > 2. PatchELF is working around a kernel bug, but doesn't mention the actual > bug it is working around. Any ideas, or shall I assume that is a rabbit hole? For 1, see bug 11123 which I added as a DEPENDS. These two issues appear related. (In reply to comment #2) > (In reply to comment #1) > > I think the fix here is to store the hole size and location, then call a > > function from writeFile that uses lseek, at least that's my running theory. > > A couple questions: > > > > 1. Why are we producing binary executables with the e_type set to DYN? > > 2. PatchELF is working around a kernel bug, but doesn't mention the actual > > bug it is working around. Any ideas, or shall I assume that is a rabbit hole? The bug seems to be described in: https://github.com/NixOS/patchelf/commit/1a64cf7edc39b93a37beb0665de8f0c6cab90f51 To update further, the kernel bug described here does still exist, I was able to test/reproduce it. Created attachment 3643 [details]
Patch for the kernel to allow holes in PT_LOAD sections, fixing the bug patchelf referrs to
The fix for #11123 also fixes this since it removes the hole code: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c4901328fe5cf912c0965e5b011b64a95a9bcb9d |