Skip to content

Commit a37476d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Signed-off-by: Dmitry Moskalchuk <[email protected]>
2 parents 5cabf09 + c2b419d commit a37476d

File tree

8 files changed

+82
-174
lines changed

8 files changed

+82
-174
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ jobs:
66
nix:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: cachix/install-nix-action@v13
9+
- uses: actions/checkout@v3
10+
- uses: cachix/install-nix-action@v17
1111
- run: nix-build -A hydraJobs.release
1212
ubuntu:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
- name: get toolchain version
1717
run: |
1818
c++ --version

.github/workflows/publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
17-
- uses: cachix/install-nix-action@v13
16+
uses: actions/checkout@v3
17+
- uses: cachix/install-nix-action@v17
1818
- name: Build tarballs
1919
run: |
2020
nix-build -A hydraJobs.tarball
2121
install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
2222
install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
23-
- uses: actions/upload-artifact@v2
23+
- uses: actions/upload-artifact@v3
2424
with:
2525
name: patchelf
2626
path: dist/*
@@ -36,9 +36,9 @@ jobs:
3636
steps:
3737
- name: Set up QEMU
3838
if: matrix.platform != 'amd64'
39-
uses: docker/setup-qemu-action@v1
39+
uses: docker/setup-qemu-action@v2
4040

41-
- uses: actions/download-artifact@v2
41+
- uses: actions/download-artifact@v3
4242
with:
4343
name: patchelf
4444
path: dist
@@ -65,7 +65,7 @@ jobs:
6565
else
6666
ENTRYPOINT=
6767
fi
68-
docker run -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:3.15 ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
68+
docker run -e CXXFLAGS -v $(pwd):/gha ${{ matrix.platform }}/alpine:3.16 ${ENTRYPOINT} sh -ec "cd /gha && sh ./build.sh"
6969
- name: Check binaries
7070
run: |
7171
cat <<EOF > check.sh
@@ -75,7 +75,7 @@ jobs:
7575
./bin/patchelf --version
7676
EOF
7777
docker run -v $(pwd):/gha ${{ matrix.platform }}/debian:stable-slim sh -ec "cd /gha && sh ./check.sh"
78-
- uses: actions/upload-artifact@v2
78+
- uses: actions/upload-artifact@v3
7979
with:
8080
name: patchelf
8181
path: dist/*
@@ -86,7 +86,7 @@ jobs:
8686
if: github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
8787
runs-on: ubuntu-latest
8888
steps:
89-
- uses: actions/download-artifact@v2
89+
- uses: actions/download-artifact@v3
9090
with:
9191
name: patchelf
9292
path: dist

README.md

Lines changed: 0 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -104,163 +104,3 @@ General Public License for more details.
104104

105105
You should have received a copy of the GNU General Public License
106106
along with this program. If not, see <http://www.gnu.org/licenses/>.
107-
108-
## Release History
109-
110-
0.14.5 (February 21, 2022):
111-
112-
* fix faulty version in 0.14.4
113-
114-
0.14.4 (February 21, 2022):
115-
116-
* Several test fixes to fix patchelf test suite on openbsd by @klemensn
117-
* Allow multiple modifications in same call by @fzakaria in https://github.com/NixOS/patchelf/pull/361
118-
* Add support to build with musl by @fzakaria in https://github.com/NixOS/patchelf/pull/362
119-
* Fix typo: s/folllow/follow/ by @bjornfor in https://github.com/NixOS/patchelf/pull/366
120-
* mips: fix incorrect polarity on dyn_offset; closes #364 by @a-m-joseph in https://github.com/NixOS/patchelf/pull/365
121-
122-
0.14.3 (December 05, 2021):
123-
124-
* this release adds support for static, pre-compiled patchelf binaries
125-
126-
0.14.2 (November 29, 2021):
127-
128-
* make version number in tarball easier to use for packagers
129-
130-
0.14.1 (November 28, 2021):
131-
132-
* build fix: add missing include
133-
134-
0.14 (November 27, 2021):
135-
136-
Changes compared to 0.13:
137-
138-
* Bug fixes:
139-
- Fix corrupted library names when using --replace-needed multiple times
140-
- Fix setting an empty rpath
141-
- Don't try to parse .dynamic section of type NOBITS
142-
- Fix use-after-free in normalizeNoteSegments
143-
- Correct EINTR handling in writeFile
144-
- MIPS: Adjust PT_MIPS_ABIFLAGS segment and DT_MIPS_RLD_MAP_REL dynamic section if present
145-
- Fix binaries without .gnu.hash section
146-
* Support loongarch architecture
147-
* Remove limits on output file size for elf files
148-
* Allow reading rpath from file
149-
* Requires now C++17 for building
150-
151-
0.13.1 (November 27, 2021):
152-
153-
* Bug fixes:
154-
- fix setting empty rpath
155-
- use memcpy instead of strcpy to set rpath
156-
- Don't try to parse .dynamic section of type NOBITS
157-
- fix use-after-free in normalizeNoteSegments
158-
- correct EINTR handling in writeFile
159-
- Adjust PT_MIPS_ABIFLAGS segment if present
160-
- Adjust DT_MIPS_RLD_MAP_REL dynamic section entry if present
161-
- fix binaries without .gnu.hash section
162-
163-
0.13 (August 5, 2021):
164-
165-
* New `--add-rpath` flag.
166-
167-
* Bug fixes.
168-
169-
0.12 (August 27, 2020):
170-
171-
* New `--clear-symbol-version` flag.
172-
173-
* Better support for relocating NOTE sections/segments.
174-
175-
* Improved the default section alignment choice.
176-
177-
* Bug fixes.
178-
179-
0.11 (June 9, 2020):
180-
181-
* New `--output` flag.
182-
183-
* Some bug fixes.
184-
185-
0.10 (March 28, 2019):
186-
187-
* Many bug fixes. Please refer to the Git commit log:
188-
189-
https://github.com/NixOS/patchelf/commits/master
190-
191-
This release has contributions from Adam Trhoň, Benjamin Hipple,
192-
Bernardo Ramos, Bjørn Forsman, Domen Kožar, Eelco Dolstra, Ezra
193-
Cooper, Felipe Sateler, Jakub Wilk, James Le Cuirot, Karl Millar,
194-
Linus Heckemann, Nathaniel J. Smith, Richard Purdie, Stanislav
195-
Markevich and Tuomas Tynkkynen.
196-
197-
0.9 (February 29, 2016):
198-
199-
* Lots of new features. Please refer to the Git commit log:
200-
201-
https://github.com/NixOS/patchelf/commits/master
202-
203-
This release has contributions from Aaron D. Marasco, Adrien
204-
Devresse, Alexandre Pretyman, Changli Gao, Chingis Dugarzhapov,
205-
darealshinji, David Sveningsson, Eelco Dolstra, Felipe Sateler,
206-
Jeremy Sanders, Jonas Kuemmerlin, Thomas Tuegel, Tuomas Tynkkynen,
207-
Vincent Danjean and Vladimír Čunát.
208-
209-
0.8 (January 15, 2014):
210-
211-
* Fix a segfault caused by certain illegal entries in symbol tables.
212-
213-
0.7 (January 7, 2014):
214-
215-
* Rewrite section indices in symbol tables. This for instance allows
216-
gdb to show proper backtraces.
217-
218-
* Added `--remove-needed' option.
219-
220-
0.6 (November 7, 2011):
221-
222-
* Hacky support for executables created by the Gold linker.
223-
224-
* Support segments with an alignment of 0 (contributed by Zack
225-
Weinberg).
226-
227-
* Added a manual page (contributed by Jeremy Sanders
228-
229-
230-
0.5 (November 4, 2009):
231-
232-
* Various bugfixes.
233-
234-
* `--force-rpath' now deletes the DT_RUNPATH if it is present.
235-
236-
0.4 (June 4, 2008):
237-
238-
* Support for growing the RPATH on dynamic libraries.
239-
240-
* IA-64 support (not tested) and related 64-bit fixes.
241-
242-
* FreeBSD support.
243-
244-
* `--set-rpath', `--shrink-rpath' and `--print-rpath' now prefer
245-
DT_RUNPATH over DT_RPATH, which is obsolete. When updating, if both
246-
are present, both are updated. If only DT_RPATH is present, it is
247-
converted to DT_RUNPATH unless `--force-rpath' is specified. If
248-
neither is present, a DT_RUNPATH is added unless `--force-rpath' is
249-
specified, in which case a DT_RPATH is added.
250-
251-
0.3 (May 24, 2007):
252-
253-
* Support for 64-bit ELF binaries (such as on x86_64-linux).
254-
255-
* Support for big-endian ELF binaries (such as on powerpc-linux).
256-
257-
* Various bugfixes.
258-
259-
0.2 (January 15, 2007):
260-
261-
* Provides a hack to get certain programs (such as the
262-
Belastingaangifte 2005) to work.
263-
264-
0.1 (October 11, 2005):
265-
266-
* Initial release.

configure.ac

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ AC_INIT([patchelf], m4_esyscmd([printf $(cat ./version)]))
33
AC_CONFIG_SRCDIR([src/patchelf.cc])
44
AC_CONFIG_AUX_DIR([build-aux])
55
AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-bzip2 foreign color-tests parallel-tests])
6+
AC_CONFIG_MACRO_DIR([m4])
67

78
AC_CHECK_TOOL([STRIP], [strip])
89

910
AM_PROG_CC_C_O
1011
AC_PROG_CXX
12+
AC_LANG([C++])
1113
AM_PROG_AS
1214

1315
DEFAULT_PAGESIZE=auto
@@ -31,5 +33,12 @@ AC_ARG_WITH([ubsan],
3133
)
3234
AM_CONDITIONAL([WITH_UBSAN], [test x"$with_ubsan" = xyes])
3335

36+
CPLUSPLUS=
37+
AX_CHECK_COMPILE_FLAG([-std=c++17], [CPLUSPLUS=17], [], [$WERROR])
38+
39+
if test -z "$CPLUSPLUS"; then
40+
AC_MSG_ERROR([Your compiler does not have the necessary C++17 support! Cannot proceed.])
41+
fi
42+
3443
AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile patchelf.spec])
3544
AC_OUTPUT

m4/ax_check_compile_flag.m4

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# ===========================================================================
2+
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
3+
# ===========================================================================
4+
#
5+
# SYNOPSIS
6+
#
7+
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
8+
#
9+
# DESCRIPTION
10+
#
11+
# Check whether the given FLAG works with the current language's compiler
12+
# or gives an error. (Warnings, however, are ignored)
13+
#
14+
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
15+
# success/failure.
16+
#
17+
# If EXTRA-FLAGS is defined, it is added to the current language's default
18+
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
19+
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
20+
# force the compiler to issue an error when a bad flag is given.
21+
#
22+
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
23+
#
24+
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
25+
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
26+
#
27+
# LICENSE
28+
#
29+
# Copyright (c) 2008 Guido U. Draheim <[email protected]>
30+
# Copyright (c) 2011 Maarten Bosmans <[email protected]>
31+
#
32+
# Copying and distribution of this file, with or without modification, are
33+
# permitted in any medium without royalty provided the copyright notice
34+
# and this notice are preserved. This file is offered as-is, without any
35+
# warranty.
36+
37+
#serial 6
38+
39+
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
40+
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
41+
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
42+
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
43+
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
44+
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
45+
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
46+
[AS_VAR_SET(CACHEVAR,[yes])],
47+
[AS_VAR_SET(CACHEVAR,[no])])
48+
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
49+
AS_VAR_IF(CACHEVAR,yes,
50+
[m4_default([$2], :)],
51+
[m4_default([$3], :)])
52+
AS_VAR_POPDEF([CACHEVAR])dnl
53+
])dnl AX_CHECK_COMPILE_FLAGS

patchelf.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" Process this file with
2-
.\" groff -man -Tascii foo.1
2+
.\" groff -man -Tascii patchelf.1
33
.\"
4-
.TH PATCHELF 1 "JUNE 2010" PATCHELF "User Manuals"
4+
.TH PATCHELF 1 "JULY 2022" PATCHELF "User Manuals"
55
.SH NAME
66
patchelf - Modify ELF files
77

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.5
1+
0.15.0

0 commit comments

Comments
 (0)