Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package patchelf for openSUSE:Factory checked in at 2026-10-06 19:14:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/patchelf (Old) and /work/SRC/openSUSE:Factory/.patchelf.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "patchelf" Tue Oct 6 19:14:02 2026 rev:26 rq:1382504 version:0.19.2 Changes: -------- --- /work/SRC/openSUSE:Factory/patchelf/patchelf.changes 2026-08-01 18:29:52.840896718 +0200 +++ /work/SRC/openSUSE:Factory/.patchelf.new.3698736/patchelf.changes 2026-10-06 19:14:15.371065906 +0200 @@ -1,0 +2,13 @@ +Mon Oct 5 11:27:23 UTC 2026 - Dirk Müller <[email protected]> + +- update to 0.19.2: + * Fix executable corruption when patching again after strip + removes padding between load segments, as seen when + bootstrapping GHC (#593, #667). Rewritten sections and program + headers now use the address mapping of the load segment + covering the ELF header. + * Avoid allocating an unnecessary extra page when growing + executable sections, while keeping split load segments from + overlapping after page alignment (#667). + +------------------------------------------------------------------- Old: ---- patchelf-0.19.1.tar.bz2 New: ---- patchelf-0.19.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ patchelf.spec ++++++ --- /var/tmp/diff_new_pack.2x0czL/_old 2026-10-06 19:14:16.573116478 +0200 +++ /var/tmp/diff_new_pack.2x0czL/_new 2026-10-06 19:14:16.580116772 +0200 @@ -17,7 +17,7 @@ Name: patchelf -Version: 0.19.1 +Version: 0.19.2 Release: 0 Summary: A utility for patching ELF binaries License: GPL-3.0-only ++++++ patchelf-0.19.1.tar.bz2 -> patchelf-0.19.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/configure new/patchelf-0.19.2/configure --- old/patchelf-0.19.1/configure 2026-07-06 23:38:06.000000000 +0200 +++ new/patchelf-0.19.2/configure 2026-10-01 14:33:27.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for patchelf 0.19.1. +# Generated by GNU Autoconf 2.72 for patchelf 0.19.2. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, @@ -600,8 +600,8 @@ # Identity of this package. PACKAGE_NAME='patchelf' PACKAGE_TARNAME='patchelf' -PACKAGE_VERSION='0.19.1' -PACKAGE_STRING='patchelf 0.19.1' +PACKAGE_VERSION='0.19.2' +PACKAGE_STRING='patchelf 0.19.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1287,7 +1287,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures patchelf 0.19.1 to adapt to many kinds of systems. +'configure' configures patchelf 0.19.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1354,7 +1354,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of patchelf 0.19.1:";; + short | recursive ) echo "Configuration of patchelf 0.19.2:";; esac cat <<\_ACEOF @@ -1458,7 +1458,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -patchelf configure 0.19.1 +patchelf configure 0.19.2 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1575,7 +1575,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by patchelf $as_me 0.19.1, which was +It was created by patchelf $as_me 0.19.2, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3076,7 +3076,7 @@ # Define the identity of the package. PACKAGE='patchelf' - VERSION='0.19.1' + VERSION='0.19.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -7246,7 +7246,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by patchelf $as_me 0.19.1, which was +This file was extended by patchelf $as_me 0.19.2, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7305,7 +7305,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -patchelf config.status 0.19.1 +patchelf config.status 0.19.2 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/patchelf.spec new/patchelf-0.19.2/patchelf.spec --- old/patchelf-0.19.1/patchelf.spec 2026-07-06 23:38:08.000000000 +0200 +++ new/patchelf-0.19.2/patchelf.spec 2026-10-01 14:33:28.000000000 +0200 @@ -1,7 +1,7 @@ Summary: A utility for patching ELF binaries Name: patchelf -Version: 0.19.1 +Version: 0.19.2 Release: 1 License: GPL Group: Development/Tools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/src/patchelf.cc new/patchelf-0.19.2/src/patchelf.cc --- old/patchelf-0.19.1/src/patchelf.cc 1970-01-01 01:00:01.000000000 +0100 +++ new/patchelf-0.19.2/src/patchelf.cc 1970-01-01 01:00:01.000000000 +0100 @@ -1139,9 +1139,11 @@ /* Calculate how many bytes are needed out of the additional pages. */ size_t extraSpace = neededSpace > startOffset ? neededSpace - startOffset : 0; - // Always give one extra page to avoid colliding with segments that start at - // unaligned addresses and will be rounded down when loaded - unsigned int neededPages = 1 + roundUp(extraSpace, getPageSize()) / getPageSize(); + /* The loader rounds the split-off LOAD down to the page containing + startOffset, so the new LOAD has to end below that page. */ + size_t startPage = startOffset - startOffset % getPageSize(); + size_t overlap = neededSpace > startPage ? neededSpace - startPage : 0; + unsigned int neededPages = roundUp(overlap, getPageSize()) / getPageSize(); debug("needed pages is %d\n", neededPages); if (neededPages * getPageSize() > firstPage) error("virtual address space underrun!"); @@ -1153,6 +1155,7 @@ } Elf_Off curOff = sizeof(Elf_Ehdr) + phdrs.size() * sizeof(Elf_Phdr); + Elf_Addr headerBase = firstPage; /* Ensure PHDR is covered by a LOAD segment. @@ -1164,6 +1167,9 @@ rdi(phdr.p_offset) <= curOff && rdi(phdr.p_offset) + rdi(phdr.p_filesz) > curOff) { + /* strip can drop file padding between LOADs, so this LOAD's + address-to-offset mapping may differ from firstPage. */ + headerBase = rdi(phdr.p_vaddr) - rdi(phdr.p_offset); if (rdi(phdr.p_filesz) < neededSpace) { wri(phdr.p_filesz, neededSpace); wri(phdr.p_memsz, neededSpace); @@ -1187,11 +1193,11 @@ memset(fileContents->data() + curOff, 0, startOffset - curOff); /* Write out the replaced sections. */ - writeReplacedSections(curOff, firstPage, 0); + writeReplacedSections(curOff, headerBase, 0); assert(curOff == neededSpace); /* Write out the updated program and section headers */ - rewriteHeaders(firstPage + rdi(hdr()->e_phoff)); + rewriteHeaders(headerBase + rdi(hdr()->e_phoff)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/tests/Makefile.am new/patchelf-0.19.2/tests/Makefile.am --- old/patchelf-0.19.1/tests/Makefile.am 1970-01-01 01:00:01.000000000 +0100 +++ new/patchelf-0.19.2/tests/Makefile.am 1970-01-01 01:00:01.000000000 +0100 @@ -1,6 +1,6 @@ LIBS = -check_PROGRAMS = simple-pie simple simple-execstack main main-no-pie main-emit-relocs pad-to-page too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections large-page +check_PROGRAMS = simple-pie simple simple-execstack main main-no-pie main-no-pie-rpath main-emit-relocs pad-to-page too-many-strtab main-scoped big-dynstr no-rpath contiguous-note-sections large-page no_rpath_arch_TESTS = \ no-rpath-alpha.sh \ @@ -37,6 +37,8 @@ no-gnu-hash.sh \ change-abi.sh \ grow-file.sh \ + executable-page-growth.sh \ + strip-gap-rewrite.sh \ no-dynamic-section.sh \ args-from-file.sh \ basic-flags.sh \ @@ -79,7 +81,7 @@ $(no_rpath_arch_TESTS): no-rpath-prebuild.sh @ln -s $< $@ -CLEANFILES = big-dynstr.c +CLEANFILES = big-dynstr.c many-syms.c many-syms-main.c clean-local: $(RM) -r scratch $(no_rpath_arch_TESTS) @@ -114,6 +116,14 @@ main_no_pie_DEPENDENCIES = libfoo.so main_no_pie_LDFLAGS = $(LDFLAGS_local) -no-pie +# With an rpath already present, --set-rpath moves .dynstr but not .dynamic; +# see strip-gap-rewrite.sh. +main_no_pie_rpath_SOURCES = main.c +main_no_pie_rpath_CFLAGS = -fno-pie +main_no_pie_rpath_LDADD = -lfoo $(AM_LDADD) +main_no_pie_rpath_DEPENDENCIES = libfoo.so +main_no_pie_rpath_LDFLAGS = $(LDFLAGS_local) -no-pie -Wl,-rpath,/nonexistent + # Non-PIE binary with a max-page-size larger than the runtime page size. On # 32-bit targets this makes patchelf relocate .dynamic into the read-only first # segment; see large-page-dynamic.sh. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/tests/Makefile.in new/patchelf-0.19.2/tests/Makefile.in --- old/patchelf-0.19.1/tests/Makefile.in 2026-07-06 23:38:05.000000000 +0200 +++ new/patchelf-0.19.2/tests/Makefile.in 2026-10-01 14:33:26.000000000 +0200 @@ -87,9 +87,9 @@ POST_UNINSTALL = : check_PROGRAMS = simple-pie$(EXEEXT) simple$(EXEEXT) \ simple-execstack$(EXEEXT) main$(EXEEXT) main-no-pie$(EXEEXT) \ - main-emit-relocs$(EXEEXT) pad-to-page$(EXEEXT) \ - too-many-strtab$(EXEEXT) main-scoped$(EXEEXT) \ - big-dynstr$(EXEEXT) no-rpath$(EXEEXT) \ + main-no-pie-rpath$(EXEEXT) main-emit-relocs$(EXEEXT) \ + pad-to-page$(EXEEXT) too-many-strtab$(EXEEXT) \ + main-scoped$(EXEEXT) big-dynstr$(EXEEXT) no-rpath$(EXEEXT) \ contiguous-note-sections$(EXEEXT) large-page$(EXEEXT) \ libfoo.so$(EXEEXT) libfoo-scoped.so$(EXEEXT) \ libbar.so$(EXEEXT) libbar-scoped.so$(EXEEXT) \ @@ -197,6 +197,10 @@ main_no_pie_OBJECTS = $(am_main_no_pie_OBJECTS) main_no_pie_LINK = $(CCLD) $(main_no_pie_CFLAGS) $(CFLAGS) \ $(main_no_pie_LDFLAGS) $(LDFLAGS) -o $@ +am_main_no_pie_rpath_OBJECTS = main_no_pie_rpath-main.$(OBJEXT) +main_no_pie_rpath_OBJECTS = $(am_main_no_pie_rpath_OBJECTS) +main_no_pie_rpath_LINK = $(CCLD) $(main_no_pie_rpath_CFLAGS) $(CFLAGS) \ + $(main_no_pie_rpath_LDFLAGS) $(LDFLAGS) -o $@ am_main_scoped_OBJECTS = main.$(OBJEXT) main_scoped_OBJECTS = $(am_main_scoped_OBJECTS) main_scoped_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -264,7 +268,8 @@ ./$(DEPDIR)/custom-init.Po ./$(DEPDIR)/foo.Po \ ./$(DEPDIR)/large_page-simple.Po ./$(DEPDIR)/main.Po \ ./$(DEPDIR)/main_emit_relocs-main.Po \ - ./$(DEPDIR)/main_no_pie-main.Po ./$(DEPDIR)/many-syms.Po \ + ./$(DEPDIR)/main_no_pie-main.Po \ + ./$(DEPDIR)/main_no_pie_rpath-main.Po ./$(DEPDIR)/many-syms.Po \ ./$(DEPDIR)/many_syms_main-many-syms-main.Po \ ./$(DEPDIR)/no_rpath-no-rpath.Po \ ./$(DEPDIR)/pad_to_page-pad-to-page.Po \ @@ -306,11 +311,12 @@ $(libsimple_execstack_so_SOURCES) $(libsimple_so_SOURCES) \ $(libtoomanystrtab_so_SOURCES) $(main_SOURCES) \ $(main_emit_relocs_SOURCES) $(main_no_pie_SOURCES) \ - $(main_scoped_SOURCES) $(many_syms_main_SOURCES) \ - $(no_rpath_SOURCES) $(pad_to_page_SOURCES) \ - $(phdr_corruption_so_SOURCES) $(pht_collision_so_SOURCES) \ - $(simple_SOURCES) $(simple_execstack_SOURCES) \ - $(simple_pie_SOURCES) $(too_many_strtab_SOURCES) + $(main_no_pie_rpath_SOURCES) $(main_scoped_SOURCES) \ + $(many_syms_main_SOURCES) $(no_rpath_SOURCES) \ + $(pad_to_page_SOURCES) $(phdr_corruption_so_SOURCES) \ + $(pht_collision_so_SOURCES) $(simple_SOURCES) \ + $(simple_execstack_SOURCES) $(simple_pie_SOURCES) \ + $(too_many_strtab_SOURCES) DIST_SOURCES = $(contiguous_note_sections_SOURCES) \ $(large_page_SOURCES) $(libbar_scoped_so_SOURCES) \ $(libbar_so_SOURCES) $(libbuildid_so_SOURCES) \ @@ -320,11 +326,12 @@ $(libsimple_execstack_so_SOURCES) $(libsimple_so_SOURCES) \ $(libtoomanystrtab_so_SOURCES) $(main_SOURCES) \ $(main_emit_relocs_SOURCES) $(main_no_pie_SOURCES) \ - $(main_scoped_SOURCES) $(many_syms_main_SOURCES) \ - $(no_rpath_SOURCES) $(pad_to_page_SOURCES) \ - $(phdr_corruption_so_SOURCES) $(pht_collision_so_SOURCES) \ - $(simple_SOURCES) $(simple_execstack_SOURCES) \ - $(simple_pie_SOURCES) $(too_many_strtab_SOURCES) + $(main_no_pie_rpath_SOURCES) $(main_scoped_SOURCES) \ + $(many_syms_main_SOURCES) $(no_rpath_SOURCES) \ + $(pad_to_page_SOURCES) $(phdr_corruption_so_SOURCES) \ + $(pht_collision_so_SOURCES) $(simple_SOURCES) \ + $(simple_execstack_SOURCES) $(simple_pie_SOURCES) \ + $(too_many_strtab_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -692,6 +699,8 @@ no-gnu-hash.sh \ change-abi.sh \ grow-file.sh \ + executable-page-growth.sh \ + strip-gap-rewrite.sh \ no-dynamic-section.sh \ args-from-file.sh \ basic-flags.sh \ @@ -729,7 +738,7 @@ overlapping-segments-after-rounding short-first-segment.gz TESTS_ENVIRONMENT = PATCHELF_DEBUG=1 STRIP=$(STRIP) NM=$(NM) OBJDUMP=$(OBJDUMP) READELF=$(READELF) OBJCOPY=$(OBJCOPY) STRINGS=$(STRINGS) -CLEANFILES = big-dynstr.c +CLEANFILES = big-dynstr.c many-syms.c many-syms-main.c # by default, use -fpic to compile AM_CFLAGS = -fpic @@ -756,6 +765,14 @@ main_no_pie_DEPENDENCIES = libfoo.so main_no_pie_LDFLAGS = $(LDFLAGS_local) -no-pie +# With an rpath already present, --set-rpath moves .dynstr but not .dynamic; +# see strip-gap-rewrite.sh. +main_no_pie_rpath_SOURCES = main.c +main_no_pie_rpath_CFLAGS = -fno-pie +main_no_pie_rpath_LDADD = -lfoo $(AM_LDADD) +main_no_pie_rpath_DEPENDENCIES = libfoo.so +main_no_pie_rpath_LDFLAGS = $(LDFLAGS_local) -no-pie -Wl,-rpath,/nonexistent + # Non-PIE binary with a max-page-size larger than the runtime page size. On # 32-bit targets this makes patchelf relocate .dynamic into the read-only first # segment; see large-page-dynamic.sh. @@ -939,6 +956,10 @@ @rm -f main-no-pie$(EXEEXT) $(AM_V_CCLD)$(main_no_pie_LINK) $(main_no_pie_OBJECTS) $(main_no_pie_LDADD) $(LIBS) +main-no-pie-rpath$(EXEEXT): $(main_no_pie_rpath_OBJECTS) $(main_no_pie_rpath_DEPENDENCIES) $(EXTRA_main_no_pie_rpath_DEPENDENCIES) + @rm -f main-no-pie-rpath$(EXEEXT) + $(AM_V_CCLD)$(main_no_pie_rpath_LINK) $(main_no_pie_rpath_OBJECTS) $(main_no_pie_rpath_LDADD) $(LIBS) + main-scoped$(EXEEXT): $(main_scoped_OBJECTS) $(main_scoped_DEPENDENCIES) $(EXTRA_main_scoped_DEPENDENCIES) @rm -f main-scoped$(EXEEXT) $(AM_V_CCLD)$(main_scoped_LINK) $(main_scoped_OBJECTS) $(main_scoped_LDADD) $(LIBS) @@ -993,6 +1014,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_emit_relocs-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_no_pie-main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_no_pie_rpath-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/many-syms.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/many_syms_main-many-syms-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no_rpath-no-rpath.Po@am__quote@ # am--include-marker @@ -1068,6 +1090,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main_no_pie_CFLAGS) $(CFLAGS) -c -o main_no_pie-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +main_no_pie_rpath-main.o: main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main_no_pie_rpath_CFLAGS) $(CFLAGS) -MT main_no_pie_rpath-main.o -MD -MP -MF $(DEPDIR)/main_no_pie_rpath-main.Tpo -c -o main_no_pie_rpath-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main_no_pie_rpath-main.Tpo $(DEPDIR)/main_no_pie_rpath-main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='main_no_pie_rpath-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main_no_pie_rpath_CFLAGS) $(CFLAGS) -c -o main_no_pie_rpath-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c + +main_no_pie_rpath-main.obj: main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main_no_pie_rpath_CFLAGS) $(CFLAGS) -MT main_no_pie_rpath-main.obj -MD -MP -MF $(DEPDIR)/main_no_pie_rpath-main.Tpo -c -o main_no_pie_rpath-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/main_no_pie_rpath-main.Tpo $(DEPDIR)/main_no_pie_rpath-main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='main_no_pie_rpath-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main_no_pie_rpath_CFLAGS) $(CFLAGS) -c -o main_no_pie_rpath-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` + many_syms_main-many-syms-main.o: many-syms-main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(many_syms_main_CFLAGS) $(CFLAGS) -MT many_syms_main-many-syms-main.o -MD -MP -MF $(DEPDIR)/many_syms_main-many-syms-main.Tpo -c -o many_syms_main-many-syms-main.o `test -f 'many-syms-main.c' || echo '$(srcdir)/'`many-syms-main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/many_syms_main-many-syms-main.Tpo $(DEPDIR)/many_syms_main-many-syms-main.Po @@ -1561,6 +1597,20 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +executable-page-growth.sh.log: executable-page-growth.sh + @p='executable-page-growth.sh'; \ + b='executable-page-growth.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +strip-gap-rewrite.sh.log: strip-gap-rewrite.sh + @p='strip-gap-rewrite.sh'; \ + b='strip-gap-rewrite.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) no-dynamic-section.sh.log: no-dynamic-section.sh @p='no-dynamic-section.sh'; \ b='no-dynamic-section.sh'; \ @@ -1955,6 +2005,7 @@ -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/main_emit_relocs-main.Po -rm -f ./$(DEPDIR)/main_no_pie-main.Po + -rm -f ./$(DEPDIR)/main_no_pie_rpath-main.Po -rm -f ./$(DEPDIR)/many-syms.Po -rm -f ./$(DEPDIR)/many_syms_main-many-syms-main.Po -rm -f ./$(DEPDIR)/no_rpath-no-rpath.Po @@ -2020,6 +2071,7 @@ -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/main_emit_relocs-main.Po -rm -f ./$(DEPDIR)/main_no_pie-main.Po + -rm -f ./$(DEPDIR)/main_no_pie_rpath-main.Po -rm -f ./$(DEPDIR)/many-syms.Po -rm -f ./$(DEPDIR)/many_syms_main-many-syms-main.Po -rm -f ./$(DEPDIR)/no_rpath-no-rpath.Po diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/tests/executable-page-growth.sh new/patchelf-0.19.2/tests/executable-page-growth.sh --- old/patchelf-0.19.1/tests/executable-page-growth.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/patchelf-0.19.2/tests/executable-page-growth.sh 1970-01-01 01:00:01.000000000 +0100 @@ -0,0 +1,27 @@ +#! /bin/sh -e + +if test "$(uname -m)" != x86_64 || test "$(uname)" != Linux; then + exit 77 +fi + +SCRATCH="scratch/$(basename "$0" .sh)" +READELF=${READELF:-readelf} + +rm -rf "${SCRATCH}" +mkdir -p "${SCRATCH}" +cp main-no-pie "${SCRATCH}/main" + +first_load_addr() { + "${READELF}" -lW "$1" | awk '$1 == "LOAD" { print $3; exit }' +} + +original_load=$(first_load_addr "${SCRATCH}/main") +../src/patchelf --set-rpath "$(printf '%0800d' 0)" "${SCRATCH}/main" +modified_load=$(first_load_addr "${SCRATCH}/main") + +# 800 bytes fit into a single extra page. +test "$((original_load - modified_load))" -eq 4096 + +exitCode=0 +LD_LIBRARY_PATH=. "${SCRATCH}/main" || exitCode=$? +test "${exitCode}" -eq 46 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/tests/overlapping-segments-after-rounding.sh new/patchelf-0.19.2/tests/overlapping-segments-after-rounding.sh --- old/patchelf-0.19.1/tests/overlapping-segments-after-rounding.sh 1970-01-01 01:00:01.000000000 +0100 +++ new/patchelf-0.19.2/tests/overlapping-segments-after-rounding.sh 1970-01-01 01:00:01.000000000 +0100 @@ -6,7 +6,19 @@ EXEC_NAME="overlapping-segments-after-rounding" -if test "$(uname -i)" = x86_64 && test "$(uname)" = Linux; then +# ldd would need the NVHPC libraries the fixture links against. +check_load_pages() { + "${READELF}" -lW "$1" | awk '$1 == "LOAD" { print $3, $6 }' | { + previous_end=0 + while read -r addr size; do + test "$((addr / 4096 * 4096))" -ge "${previous_end}" + previous_end=$(((addr + size + 4095) / 4096 * 4096)) + done + test "${previous_end}" -gt 0 + } +} + +if test "$(uname -m)" = x86_64 && test "$(uname)" = Linux; then rm -rf "${SCRATCH}" mkdir -p "${SCRATCH}" @@ -15,9 +27,9 @@ ${PATCHELF} --force-rpath --remove-rpath --output modified1 "${EXEC_NAME}" - ldd modified1 + check_load_pages modified1 ${PATCHELF} --force-rpath --set-rpath "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --output modified2 modified1 - ldd modified2 + check_load_pages modified2 fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/tests/strip-gap-rewrite.sh new/patchelf-0.19.2/tests/strip-gap-rewrite.sh --- old/patchelf-0.19.1/tests/strip-gap-rewrite.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/patchelf-0.19.2/tests/strip-gap-rewrite.sh 1970-01-01 01:00:01.000000000 +0100 @@ -0,0 +1,31 @@ +#! /bin/sh -e + +if test "$(uname -m)" != x86_64 || test "$(uname)" != Linux; then + exit 77 +fi + +SCRATCH="scratch/$(basename "$0" .sh)" +READELF=${READELF:-readelf} +STRIP=${STRIP:-strip} + +rm -rf "${SCRATCH}" +mkdir -p "${SCRATCH}" +cp main-no-pie-rpath "${SCRATCH}/main" + +# The oversized page leaves file padding between the LOADs for strip to remove. +../src/patchelf --page-size 8192 --set-rpath "$(printf '%0800d' 0)" "${SCRATCH}/main" +"${STRIP}" "${SCRATCH}/main" + +# Guard the precondition: the first two LOADs must map offsets to addresses +# differently, otherwise this test exercises nothing. +"${READELF}" -lW "${SCRATCH}/main" | awk '$1 == "LOAD" { print $3, $2 }' | { + read -r addr1 off1 + read -r addr2 off2 + test "$((addr1 - off1))" -ne "$((addr2 - off2))" +} + +../src/patchelf --set-rpath "$(printf '%01600d' 0)" "${SCRATCH}/main" + +exitCode=0 +LD_LIBRARY_PATH=. "${SCRATCH}/main" || exitCode=$? +test "${exitCode}" -eq 46 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/patchelf-0.19.1/version new/patchelf-0.19.2/version --- old/patchelf-0.19.1/version 2026-07-06 23:38:03.000000000 +0200 +++ new/patchelf-0.19.2/version 2026-10-01 14:33:24.000000000 +0200 @@ -1 +1 @@ -0.19.1 +0.19.2
