summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Drop superfluous semicolonsChristian Göttsche2023-02-211-2/+2
| | | |
| * | | Use C++11 [[noreturn]]Christian Göttsche2023-02-211-1/+1
| | | |
| * | | Avoid potential overflows in checkPointer()Christian Göttsche2023-02-211-3/+2
| | | | | | | | | | | | | | | | | | | | Prevent overflows in the addtion of q and size, and avoid truncations in callers by using size_t as type for size.
| * | | Drop unnecessary casts in getElfType()Christian Göttsche2023-02-211-2/+2
| | | | | | | | | | | | | | | | Also declare the function static and warn if return value not used.
| * | | Close file before potentially throwingChristian Göttsche2023-02-211-2/+2
| | | |
| * | | Avoid unnecessary copies in splitColonDelimitedString()Christian Göttsche2023-02-211-6/+11
| | | | | | | | | | | | | | | | Avoid creating a stringstream by using find().
| * | | Use C++ casts instead of raw C ones in hdr()Christian Göttsche2023-02-211-2/+2
| | | |
| * | | Drop unnecessary friend declarationsChristian Göttsche2023-02-211-4/+0
| | | |
| * | | Add misc functions annotationsChristian Göttsche2023-02-212-20/+20
| | | | | | | | | | | | | | | | Make the behavior of functions more explicit.
| * | | Add required includes in header fileChristian Göttsche2023-02-211-0/+9
|/ / / | | | | | | | | | | | | Enable to parse the header file on its own, e.g. for language servers (clangd).
| * | No need for both assert and exceptionBreno Rodrigues Guimaraes2023-02-211-5/+3
| | |
| * | Code polishing to use more spansBreno Rodrigues Guimaraes2023-02-212-17/+21
| | |
| * | Add out-of-range check for spanBreno Rodrigues Guimaraes2023-02-211-5/+12
| | |
| * | Merge branch 'NixOS:master' into breno.rename_symsBreno Rodrigues Guimarães2023-02-2132-282/+275
| |\ \ | |/ / |/| |
* | | Merge #463bors[bot]2023-02-2032-282/+275
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 463: Apply fixes from shellcheck r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
| * | | bump github actions versionJörg Thalheim2023-02-201-1/+1
| | | |
| * | | tests: apply suggestions from shellcheckJörg Thalheim2023-02-2031-281/+274
|/ / /
| * | Update patchelf.1Breno Rodrigues Guimarães2023-02-211-2/+4
| | | | | | | | | Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
| * | Add description to patchelf.1Breno Rodrigues Guimaraes2023-02-202-1/+5
| | |
| * | Add support for symbol name remappingBreno Rodrigues Guimaraes2023-02-204-7/+444
|/ /
| * Update tests/repeated-updates.shBreno Rodrigues Guimarães2023-02-231-1/+1
| | | | | | Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
| * Merge branch 'master' into breno.457Jörg Thalheim2023-02-209-10/+383
| |\ | |/ |/|
* | Merge #456bors[bot]2023-02-207-7/+380
|\ \ | | | | | | | | | | | | | | | | | | | | | 456: Add options to print, clear and set executable stack state r=Mic92 a=cgzones Co-authored-by: Christian Göttsche <cgzones@googlemail.com>
| * | Add options to print, clear and set executable stack stateChristian Göttsche2023-01-287-7/+380
| | | | | | | | | | | | | | | | | | Add options the modify the state of the executable flag of the GNU_STACK program header. That header indicates whether the object is requiring an executable stack.
* | | Merge #458bors[bot]2023-02-192-3/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 458: Bump cachix/install-nix-action from 18 to 19 r=Mic92 a=dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
| * | Bump cachix/install-nix-action from 18 to 19dependabot[bot]2023-02-132-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
| * to trigger ciBreno Rodrigues Guimaraes2023-02-201-1/+1
| |
| * Update src/patchelf.ccBreno Rodrigues Guimarães2023-02-191-1/+2
| | | | | | Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
| * Avoid overlapping program header table with section header table #457Breno Rodrigues Guimaraes2023-02-193-10/+78
|/ | | | | | | | | | | This patch checks if the section header table is placed right after the program header table such that it would overlap when we add a new entry in the program header table. If that is the case, move the section header table to the end of the file. Moreover, there is no need to add a new PT_LOAD segment everytime. Check if the last segment is already a PT_LOAD with the same characteristics and adjacent. Extend it in this case.
* bump version0.17.2Jörg Thalheim2023-01-101-1/+1
|
* Merge #4470.17.1bors[bot]2023-01-102-5/+7
|\ | | | | | | | | | | | | | | 447: Split segment size fix r=Mic92 a=otherjason Co-authored-by: Jason <otherjason@nodomain.com>
| * Revert "shiftFile: when splitting a segment into two pieces, preserve the ↵Jason2022-12-281-5/+1
| | | | | | | | | | | | original flags in both" This reverts commit f4f1848e42b68adca04019bcf0d47132d1530bf2.
| * Fix bug in file shifting that could cause conflicting PT_LOAD segmentsJason2022-12-022-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a section in the file needs to be enlarged (e.g. to accommodate setting a larger RPATH), shiftFile() is used to shift all content following the growing section to a later position in the file. Commit 109b771f53ee3d37ede8c0f165665605183c0975 introduced logic to ensure that, after the segment split, no sections span multiple segments. This is done by sliding the portion of the segment after the split point later in the file, then adding a new PT_LOAD segment that contains the preceding data plus the extra room that is being added. The existing implementation does this by simply adding `extraPages*getPageSize()` bytes to the number of bytes ahead of the split point in the segment. However, this approach can result in two PT_LOAD segments that overlap when page boundaries are taken into account. As an example, this PT_LOAD section (taken from a Python 3.10 binary): LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 0x0000000000000948 0x0000000000000948 R E 0x200000 is split into the following two sections: LOAD 0x0000000000000000 0x00000000003ff000 0x00000000003ff000 0x0000000000001594 0x0000000000001594 R E 0x1000 LOAD 0x0000000000001594 0x0000000000400594 0x0000000000400594 0x00000000000003b4 0x00000000000003b4 R E 0x1000 Note that the two PT_LOAD sections both contain the memory page at address 0x400000. The Linux kernel's ELF loader (at least as of v4.18) does not accept this as a valid ELF executable, triggering a segfault with si_code=SI_KERNEL immediately when the binary is executed. The fix here is to set the length of the segment that comes before the split point more carefully; instead of adding `extraPages*getPageSize()` bytes to the portion of the segment that came before the split, the actual number of padding bytes that were needed (before rounding up to the next multiple of the page size) are used. This avoids the overlap in the PT_LOAD segments and makes the output files executable again.
| * shiftFile: when splitting a segment into two pieces, preserve the original ↵Jason2022-12-021-1/+5
| | | | | | | | flags in both
* | Merge #452bors[bot]2022-12-272-3/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | 452: Add bors.toml r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
| * | bors: add configurationJörg Thalheim2022-12-271-0/+17
| | |
| * | bump nixpkgsJörg Thalheim2022-12-271-3/+3
|/ /
* | Merge pull request #451 from yairKoskas/masterJörg Thalheim2022-12-271-0/+1
|\ \ | |/ |/| Fix Out-of-bounds read in the function modifySoname
| * Out-of-bounds read exists in the function modifySonameyairKoskas2022-12-271-0/+1
|/
* Merge pull request #445 from NixOS/win32Jörg Thalheim2022-11-173-41/+26
|\ | | | | switch back to upstream nixpkgs for windows build
| * switch back to upstream nixpkgs for windows buildJörg Thalheim2022-11-173-41/+26
|/
* Merge pull request #444 from NixOS/netbsdJörg Thalheim2022-11-141-3/+6
|\ | | | | cross compile to netbsd
| * cross compile to netbsdJörg Thalheim2022-11-141-3/+6
|/
* Merge pull request #443 from heirecka/also-pass-strip-to-testsJörg Thalheim2022-11-081-1/+1
|\ | | | | Also pass STRIP to the tests
| * Also pass STRIP to the testsHeiko Becker2022-11-081-1/+1
| | | | | | | | It is used in tests/no-gnu-hash.sh.
* | Merge pull request #442 from NixOS/ciJörg Thalheim2022-11-082-5/+5
|\ \ | |/ |/| Ci
| * put version name in built exe filesJörg Thalheim2022-11-071-4/+4
| |
| * bump versionJörg Thalheim2022-11-071-1/+1
|/
* Merge pull request #441 from NixOS/ci0.17.0Jörg Thalheim2022-11-071-1/+1
|\ | | | | bump version 0.17.0
| * bump version 0.17.0Jörg Thalheim2022-11-061-1/+1
|/