sicherha pushed to rpms/mold (epel8). "Bump version to 1.6.0"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 19:37:24 UTC
From 8eff4703e522bd023a611881fd20d3dda6e75f59 Mon Sep 17 00:00:00 2001
From: Christoph Erhardt <fedora(a)sicherha.de>
Date: Oct 22 2022 15:26:09 +0000
Subject: Bump version to 1.6.0
---
diff --git a/0002-ELF-Fix-test-for-PPC64LE.patch b/0002-ELF-Fix-test-for-PPC64LE.patch
deleted file mode 100644
index 09f0b5a..0000000
--- a/0002-ELF-Fix-test-for-PPC64LE.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f6f03510d6c19e6009c903fed00294813126db3b Mon Sep 17 00:00:00 2001
-Message-Id: <f6f03510d6c19e6009c903fed00294813126db3b.1664460024.git.github(a)sicherha.de>
-In-Reply-To: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-References: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-From: Rui Ueyama <ruiu(a)bluewhale.systems>
-Date: Thu, 29 Sep 2022 15:41:28 +0800
-Subject: [PATCH 2/2] [ELF] Fix test for PPC64LE
-
-`readelf --symbols` print out auxiliary information after a symbol name
-for PPC64, so something like `foo$` didn't match.
-
- 7: 0000000000000000 80 FUNC GLOBAL DEFAULT 3 main [<localentry>: 8]
- 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .TOC.
- 9: 0000000000000000 72 FUNC GLOBAL DEFAULT 11 foo [<localentry>: 8]
- 10: 0000000000000000 40 FUNC GLOBAL DEFAULT 19 bar
-
-Fixes https://github.com/rui314/mold/issues/739
----
- test/elf/relocatable-archive.sh | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/test/elf/relocatable-archive.sh b/test/elf/relocatable-archive.sh
-index e5544bb8..759cd871 100755
---- a/test/elf/relocatable-archive.sh
-+++ b/test/elf/relocatable-archive.sh
-@@ -38,8 +38,8 @@ ar crs $t/e.a $t/a.o $t/b.o $t/c.o
- ./mold -r -o $t/f.o $t/d.o $t/e.a
-
- readelf --symbols $t/f.o > $t/log
--grep -q 'foo$' $t/log
--grep -q 'bar$' $t/log
--! grep -q 'baz$' $t/log || false
-+grep -q 'foo\b' $t/log
-+grep -q 'bar\b' $t/log
-+! grep -q 'baz\b' $t/log || false
-
- echo OK
---
-2.37.3
-
diff --git a/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
new file mode 100644
index 0000000..8ff0bde
--- /dev/null
+++ b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
@@ -0,0 +1,44 @@
+From 2f5b3be6214d8157736e60f68693352a3ffd5a47 Mon Sep 17 00:00:00 2001
+Message-Id: <2f5b3be6214d8157736e60f68693352a3ffd5a47.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 19:33:18 +0800
+Subject: [PATCH 2/3] [ELF][i386] Allow R_386_PC32 after R_386_TLS_{GD,LDM}
+
+I don't know why GCC sometimes creates a PC32 relocation instead of
+PLT32 after a TLS_GD/TLS_LDM. I believe it's strictly speaking a
+violation of the psABI. But we need to handle such input.
+
+Fixes https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 46391844..20563faa 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -485,7 +485,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsgd(ctx, sym))
+@@ -498,7 +499,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsld(ctx))
+--
+2.37.3
+
diff --git a/0003-ELF-i386-Fix-assertion-failure.patch b/0003-ELF-i386-Fix-assertion-failure.patch
new file mode 100644
index 0000000..2ce9d75
--- /dev/null
+++ b/0003-ELF-i386-Fix-assertion-failure.patch
@@ -0,0 +1,40 @@
+From b6d3255e1a498d5a966bd303eb09390aa24ef596 Mon Sep 17 00:00:00 2001
+Message-Id: <b6d3255e1a498d5a966bd303eb09390aa24ef596.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 20:14:53 +0800
+Subject: [PATCH 3/3] [ELF][i386] Fix assertion failure
+
+https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 20563faa..87524fd1 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -234,7 +234,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax GD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax
+ 0x81, 0xe8, 0, 0, 0, 0, // add $val, %eax
+@@ -266,7 +267,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax LD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x31, 0xc0, // xor %eax, %eax
+ 0x65, 0x8b, 0x00, // mov %gs:(%eax), %eax
+--
+2.37.3
+
diff --git a/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
new file mode 100644
index 0000000..54d5859
--- /dev/null
+++ b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
@@ -0,0 +1,40 @@
+From 8bfdf07e71706162ab98159bf1a412d31ff31e0e Mon Sep 17 00:00:00 2001
+Message-Id: <8bfdf07e71706162ab98159bf1a412d31ff31e0e.1666443387.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+From: Christoph Erhardt <github(a)sicherha.de>
+Date: Sat, 22 Oct 2022 14:41:42 +0200
+Subject: [PATCH 4/4] Fix name lookup for section symbols when `st_shndx ==
+ SHN_XINDEX`
+
+When the section-header index has the escape value `SHN_XINDEX`, the
+actual index must be looked up in the separate `SHT_SYMTAB_SHNDX` table.
+Trying to use `SHN_XINDEX` (= 0xffff) as an index results in an
+out-of-bounds read. The error can be observed when running the
+`x86_64_many-sections.sh` test on RHEL 8 or 9 (but not on Fedora,
+because there the assembler doesn't emit section symbols).
+
+Instead of using `st_shndx` directly, call the pre-existing helper
+method `get_shndx()` to get the correct behaviour.
+
+Signed-off-by: Christoph Erhardt <github(a)sicherha.de>
+---
+ elf/input-files.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/elf/input-files.cc b/elf/input-files.cc
+index 15ccd634..3c5ca619 100644
+--- a/elf/input-files.cc
++++ b/elf/input-files.cc
+@@ -439,7 +439,7 @@ void ObjectFile<E>::initialize_symbols(Context<E> &ctx) {
+
+ std::string_view name;
+ if (esym.st_type == STT_SECTION)
+- name = this->shstrtab.data() + this->elf_sections[esym.st_shndx].sh_name;
++ name = this->shstrtab.data() + this->elf_sections[get_shndx(esym)].sh_name;
+ else
+ name = this->symbol_strtab.data() + esym.st_name;
+
+--
+2.37.3
+
diff --git a/mold.spec b/mold.spec
index 1a4366c..c8e6959 100644
--- a/mold.spec
+++ b/mold.spec
@@ -1,5 +1,5 @@
Name: mold
-Version: 1.5.1
+Version: 1.6.0
Release: 1%{?dist}
Summary: A Modern Linker
@@ -17,11 +17,15 @@ Patch0: tbb-strip-werror.patch
# Allow building against the system-provided `xxhash.h`
Patch2: 0001-Use-system-compatible-include-path-for-xxhash.h.patch
-# Fix unit test failing on ppc64
-Patch3: 0002-ELF-Fix-test-for-PPC64LE.patch
+# Fix test failure on i386 (https://github.com/rui314/mold/issues/794)
+Patch3: 0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
+Patch4: 0003-ELF-i386-Fix-assertion-failure.patch
+
+# Fix test failure on epel8/epel9 (https://github.com/rui314/mold/pull/809)
+Patch5: 0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
# mold can currently produce native binaries for these architectures only
-ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 ppc64le %{riscv32} %{riscv64} sparc64 sparc64v
+ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 %{power64} %{riscv32} %{riscv64} s390x sparc64 sparc64v
BuildRequires: cmake
%if 0%{?el8}
@@ -36,6 +40,9 @@ BuildRequires: openssl-devel
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
+# Required by bundled oneTBB
+BuildRequires: hwloc-devel
+
# The following packages are only required for executing the tests
BuildRequires: clang
BuildRequires: gdb
@@ -104,6 +111,11 @@ fi
%{_mandir}/man1/mold.1*
%changelog
+* Sat Oct 22 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.6.0-1
+- Bump version to 1.6.0
+- Add new supported architectures
+- Drop upstreamed patch
+
* Thu Sep 29 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.5.1-1
- Bump version to 1.5.1 (#2130132)
- Switch to CMake build
diff --git a/sources b/sources
index ce2f44f..99d30c6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mold-1.5.1.tar.gz) = 340a45c5190ce5ba87eaa05238da7c70400bf4a2788a095935b9675593078ad76bbd95e67aa36b3ec683428724a3c6bc27c7e0a69569afce461682dc4bd16b10
+SHA512 (mold-1.6.0.tar.gz) = dcb498da95ee02a08b175861ae24f3793705671670f6f3487eebd3aab2487fd2163fc1747c9ca2fd1c3570a5f1f0bcfd7d4d91bf6a904a1ba098be6cbbe8c857
https://src.fedoraproject.org/rpms/mold/c/8eff4703e522bd023a611881fd20d3d...
1Â year, 5Â months
sicherha pushed to rpms/mold (epel9). "Bump version to 1.6.0"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 19:05:41 UTC
From 8eff4703e522bd023a611881fd20d3dda6e75f59 Mon Sep 17 00:00:00 2001
From: Christoph Erhardt <fedora(a)sicherha.de>
Date: Oct 22 2022 15:26:09 +0000
Subject: Bump version to 1.6.0
---
diff --git a/0002-ELF-Fix-test-for-PPC64LE.patch b/0002-ELF-Fix-test-for-PPC64LE.patch
deleted file mode 100644
index 09f0b5a..0000000
--- a/0002-ELF-Fix-test-for-PPC64LE.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f6f03510d6c19e6009c903fed00294813126db3b Mon Sep 17 00:00:00 2001
-Message-Id: <f6f03510d6c19e6009c903fed00294813126db3b.1664460024.git.github(a)sicherha.de>
-In-Reply-To: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-References: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-From: Rui Ueyama <ruiu(a)bluewhale.systems>
-Date: Thu, 29 Sep 2022 15:41:28 +0800
-Subject: [PATCH 2/2] [ELF] Fix test for PPC64LE
-
-`readelf --symbols` print out auxiliary information after a symbol name
-for PPC64, so something like `foo$` didn't match.
-
- 7: 0000000000000000 80 FUNC GLOBAL DEFAULT 3 main [<localentry>: 8]
- 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .TOC.
- 9: 0000000000000000 72 FUNC GLOBAL DEFAULT 11 foo [<localentry>: 8]
- 10: 0000000000000000 40 FUNC GLOBAL DEFAULT 19 bar
-
-Fixes https://github.com/rui314/mold/issues/739
----
- test/elf/relocatable-archive.sh | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/test/elf/relocatable-archive.sh b/test/elf/relocatable-archive.sh
-index e5544bb8..759cd871 100755
---- a/test/elf/relocatable-archive.sh
-+++ b/test/elf/relocatable-archive.sh
-@@ -38,8 +38,8 @@ ar crs $t/e.a $t/a.o $t/b.o $t/c.o
- ./mold -r -o $t/f.o $t/d.o $t/e.a
-
- readelf --symbols $t/f.o > $t/log
--grep -q 'foo$' $t/log
--grep -q 'bar$' $t/log
--! grep -q 'baz$' $t/log || false
-+grep -q 'foo\b' $t/log
-+grep -q 'bar\b' $t/log
-+! grep -q 'baz\b' $t/log || false
-
- echo OK
---
-2.37.3
-
diff --git a/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
new file mode 100644
index 0000000..8ff0bde
--- /dev/null
+++ b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
@@ -0,0 +1,44 @@
+From 2f5b3be6214d8157736e60f68693352a3ffd5a47 Mon Sep 17 00:00:00 2001
+Message-Id: <2f5b3be6214d8157736e60f68693352a3ffd5a47.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 19:33:18 +0800
+Subject: [PATCH 2/3] [ELF][i386] Allow R_386_PC32 after R_386_TLS_{GD,LDM}
+
+I don't know why GCC sometimes creates a PC32 relocation instead of
+PLT32 after a TLS_GD/TLS_LDM. I believe it's strictly speaking a
+violation of the psABI. But we need to handle such input.
+
+Fixes https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 46391844..20563faa 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -485,7 +485,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsgd(ctx, sym))
+@@ -498,7 +499,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsld(ctx))
+--
+2.37.3
+
diff --git a/0003-ELF-i386-Fix-assertion-failure.patch b/0003-ELF-i386-Fix-assertion-failure.patch
new file mode 100644
index 0000000..2ce9d75
--- /dev/null
+++ b/0003-ELF-i386-Fix-assertion-failure.patch
@@ -0,0 +1,40 @@
+From b6d3255e1a498d5a966bd303eb09390aa24ef596 Mon Sep 17 00:00:00 2001
+Message-Id: <b6d3255e1a498d5a966bd303eb09390aa24ef596.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 20:14:53 +0800
+Subject: [PATCH 3/3] [ELF][i386] Fix assertion failure
+
+https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 20563faa..87524fd1 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -234,7 +234,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax GD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax
+ 0x81, 0xe8, 0, 0, 0, 0, // add $val, %eax
+@@ -266,7 +267,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax LD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x31, 0xc0, // xor %eax, %eax
+ 0x65, 0x8b, 0x00, // mov %gs:(%eax), %eax
+--
+2.37.3
+
diff --git a/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
new file mode 100644
index 0000000..54d5859
--- /dev/null
+++ b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
@@ -0,0 +1,40 @@
+From 8bfdf07e71706162ab98159bf1a412d31ff31e0e Mon Sep 17 00:00:00 2001
+Message-Id: <8bfdf07e71706162ab98159bf1a412d31ff31e0e.1666443387.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+From: Christoph Erhardt <github(a)sicherha.de>
+Date: Sat, 22 Oct 2022 14:41:42 +0200
+Subject: [PATCH 4/4] Fix name lookup for section symbols when `st_shndx ==
+ SHN_XINDEX`
+
+When the section-header index has the escape value `SHN_XINDEX`, the
+actual index must be looked up in the separate `SHT_SYMTAB_SHNDX` table.
+Trying to use `SHN_XINDEX` (= 0xffff) as an index results in an
+out-of-bounds read. The error can be observed when running the
+`x86_64_many-sections.sh` test on RHEL 8 or 9 (but not on Fedora,
+because there the assembler doesn't emit section symbols).
+
+Instead of using `st_shndx` directly, call the pre-existing helper
+method `get_shndx()` to get the correct behaviour.
+
+Signed-off-by: Christoph Erhardt <github(a)sicherha.de>
+---
+ elf/input-files.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/elf/input-files.cc b/elf/input-files.cc
+index 15ccd634..3c5ca619 100644
+--- a/elf/input-files.cc
++++ b/elf/input-files.cc
+@@ -439,7 +439,7 @@ void ObjectFile<E>::initialize_symbols(Context<E> &ctx) {
+
+ std::string_view name;
+ if (esym.st_type == STT_SECTION)
+- name = this->shstrtab.data() + this->elf_sections[esym.st_shndx].sh_name;
++ name = this->shstrtab.data() + this->elf_sections[get_shndx(esym)].sh_name;
+ else
+ name = this->symbol_strtab.data() + esym.st_name;
+
+--
+2.37.3
+
diff --git a/mold.spec b/mold.spec
index 1a4366c..c8e6959 100644
--- a/mold.spec
+++ b/mold.spec
@@ -1,5 +1,5 @@
Name: mold
-Version: 1.5.1
+Version: 1.6.0
Release: 1%{?dist}
Summary: A Modern Linker
@@ -17,11 +17,15 @@ Patch0: tbb-strip-werror.patch
# Allow building against the system-provided `xxhash.h`
Patch2: 0001-Use-system-compatible-include-path-for-xxhash.h.patch
-# Fix unit test failing on ppc64
-Patch3: 0002-ELF-Fix-test-for-PPC64LE.patch
+# Fix test failure on i386 (https://github.com/rui314/mold/issues/794)
+Patch3: 0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
+Patch4: 0003-ELF-i386-Fix-assertion-failure.patch
+
+# Fix test failure on epel8/epel9 (https://github.com/rui314/mold/pull/809)
+Patch5: 0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
# mold can currently produce native binaries for these architectures only
-ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 ppc64le %{riscv32} %{riscv64} sparc64 sparc64v
+ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 %{power64} %{riscv32} %{riscv64} s390x sparc64 sparc64v
BuildRequires: cmake
%if 0%{?el8}
@@ -36,6 +40,9 @@ BuildRequires: openssl-devel
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
+# Required by bundled oneTBB
+BuildRequires: hwloc-devel
+
# The following packages are only required for executing the tests
BuildRequires: clang
BuildRequires: gdb
@@ -104,6 +111,11 @@ fi
%{_mandir}/man1/mold.1*
%changelog
+* Sat Oct 22 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.6.0-1
+- Bump version to 1.6.0
+- Add new supported architectures
+- Drop upstreamed patch
+
* Thu Sep 29 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.5.1-1
- Bump version to 1.5.1 (#2130132)
- Switch to CMake build
diff --git a/sources b/sources
index ce2f44f..99d30c6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mold-1.5.1.tar.gz) = 340a45c5190ce5ba87eaa05238da7c70400bf4a2788a095935b9675593078ad76bbd95e67aa36b3ec683428724a3c6bc27c7e0a69569afce461682dc4bd16b10
+SHA512 (mold-1.6.0.tar.gz) = dcb498da95ee02a08b175861ae24f3793705671670f6f3487eebd3aab2487fd2163fc1747c9ca2fd1c3570a5f1f0bcfd7d4d91bf6a904a1ba098be6cbbe8c857
https://src.fedoraproject.org/rpms/mold/c/8eff4703e522bd023a611881fd20d3d...
1Â year, 5Â months
eclipseo pushed to rpms/golang-github-moby-swarmkit-2 (rawhide).
"Disable some tests for ppc64le"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 18:55:40 UTC
From cbc1dadeca964396e289cd340e0670378090479d Mon Sep 17 00:00:00 2001
From: Robert-André Mauchin <zebob.m(a)gmail.com>
Date: Oct 22 2022 18:55:32 +0000
Subject: Disable some tests for ppc64le
---
diff --git a/golang-github-moby-swarmkit-2.spec b/golang-github-moby-swarmkit-2.spec
index 2f94706..d9f2b2e 100644
--- a/golang-github-moby-swarmkit-2.spec
+++ b/golang-github-moby-swarmkit-2.spec
@@ -61,6 +61,7 @@ for test in "TestValidateCAConfigValidValues" \
"TestDemoteLeader" \
"TestDemotePromoteLeader" \
"TestDemotePromote" \
+ "TestNodeOps" \
; do
awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test)
done
https://src.fedoraproject.org/rpms/golang-github-moby-swarmkit-2/c/cbc1da...
1Â year, 5Â months
eclipseo pushed to rpms/golang-github-moby-swarmkit-2 (rawhide).
"Disable some tests for ppc64le"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 18:36:29 UTC
From 4406301bcebeb5ee860279c62800beea21da481c Mon Sep 17 00:00:00 2001
From: Robert-André Mauchin <zebob.m(a)gmail.com>
Date: Oct 22 2022 18:36:15 +0000
Subject: Disable some tests for ppc64le
---
diff --git a/golang-github-moby-swarmkit-2.spec b/golang-github-moby-swarmkit-2.spec
index 582afe2..2f94706 100644
--- a/golang-github-moby-swarmkit-2.spec
+++ b/golang-github-moby-swarmkit-2.spec
@@ -54,6 +54,13 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%if %{with check}
%check
for test in "TestValidateCAConfigValidValues" \
+ "TestMixedFIPSClusterNonMandatoryFIPS" \
+ "TestListManagerNodes" \
+ "TestSuccessfulRootRotation" \
+ "TestRestartLeader" \
+ "TestDemoteLeader" \
+ "TestDemotePromoteLeader" \
+ "TestDemotePromote" \
; do
awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test)
done
https://src.fedoraproject.org/rpms/golang-github-moby-swarmkit-2/c/440630...
1Â year, 5Â months
sicherha pushed to rpms/mold (f35). "Bump version to 1.6.0"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 18:30:16 UTC
From 8eff4703e522bd023a611881fd20d3dda6e75f59 Mon Sep 17 00:00:00 2001
From: Christoph Erhardt <fedora(a)sicherha.de>
Date: Oct 22 2022 15:26:09 +0000
Subject: Bump version to 1.6.0
---
diff --git a/0002-ELF-Fix-test-for-PPC64LE.patch b/0002-ELF-Fix-test-for-PPC64LE.patch
deleted file mode 100644
index 09f0b5a..0000000
--- a/0002-ELF-Fix-test-for-PPC64LE.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f6f03510d6c19e6009c903fed00294813126db3b Mon Sep 17 00:00:00 2001
-Message-Id: <f6f03510d6c19e6009c903fed00294813126db3b.1664460024.git.github(a)sicherha.de>
-In-Reply-To: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-References: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-From: Rui Ueyama <ruiu(a)bluewhale.systems>
-Date: Thu, 29 Sep 2022 15:41:28 +0800
-Subject: [PATCH 2/2] [ELF] Fix test for PPC64LE
-
-`readelf --symbols` print out auxiliary information after a symbol name
-for PPC64, so something like `foo$` didn't match.
-
- 7: 0000000000000000 80 FUNC GLOBAL DEFAULT 3 main [<localentry>: 8]
- 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .TOC.
- 9: 0000000000000000 72 FUNC GLOBAL DEFAULT 11 foo [<localentry>: 8]
- 10: 0000000000000000 40 FUNC GLOBAL DEFAULT 19 bar
-
-Fixes https://github.com/rui314/mold/issues/739
----
- test/elf/relocatable-archive.sh | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/test/elf/relocatable-archive.sh b/test/elf/relocatable-archive.sh
-index e5544bb8..759cd871 100755
---- a/test/elf/relocatable-archive.sh
-+++ b/test/elf/relocatable-archive.sh
-@@ -38,8 +38,8 @@ ar crs $t/e.a $t/a.o $t/b.o $t/c.o
- ./mold -r -o $t/f.o $t/d.o $t/e.a
-
- readelf --symbols $t/f.o > $t/log
--grep -q 'foo$' $t/log
--grep -q 'bar$' $t/log
--! grep -q 'baz$' $t/log || false
-+grep -q 'foo\b' $t/log
-+grep -q 'bar\b' $t/log
-+! grep -q 'baz\b' $t/log || false
-
- echo OK
---
-2.37.3
-
diff --git a/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
new file mode 100644
index 0000000..8ff0bde
--- /dev/null
+++ b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
@@ -0,0 +1,44 @@
+From 2f5b3be6214d8157736e60f68693352a3ffd5a47 Mon Sep 17 00:00:00 2001
+Message-Id: <2f5b3be6214d8157736e60f68693352a3ffd5a47.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 19:33:18 +0800
+Subject: [PATCH 2/3] [ELF][i386] Allow R_386_PC32 after R_386_TLS_{GD,LDM}
+
+I don't know why GCC sometimes creates a PC32 relocation instead of
+PLT32 after a TLS_GD/TLS_LDM. I believe it's strictly speaking a
+violation of the psABI. But we need to handle such input.
+
+Fixes https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 46391844..20563faa 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -485,7 +485,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsgd(ctx, sym))
+@@ -498,7 +499,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsld(ctx))
+--
+2.37.3
+
diff --git a/0003-ELF-i386-Fix-assertion-failure.patch b/0003-ELF-i386-Fix-assertion-failure.patch
new file mode 100644
index 0000000..2ce9d75
--- /dev/null
+++ b/0003-ELF-i386-Fix-assertion-failure.patch
@@ -0,0 +1,40 @@
+From b6d3255e1a498d5a966bd303eb09390aa24ef596 Mon Sep 17 00:00:00 2001
+Message-Id: <b6d3255e1a498d5a966bd303eb09390aa24ef596.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 20:14:53 +0800
+Subject: [PATCH 3/3] [ELF][i386] Fix assertion failure
+
+https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 20563faa..87524fd1 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -234,7 +234,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax GD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax
+ 0x81, 0xe8, 0, 0, 0, 0, // add $val, %eax
+@@ -266,7 +267,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax LD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x31, 0xc0, // xor %eax, %eax
+ 0x65, 0x8b, 0x00, // mov %gs:(%eax), %eax
+--
+2.37.3
+
diff --git a/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
new file mode 100644
index 0000000..54d5859
--- /dev/null
+++ b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
@@ -0,0 +1,40 @@
+From 8bfdf07e71706162ab98159bf1a412d31ff31e0e Mon Sep 17 00:00:00 2001
+Message-Id: <8bfdf07e71706162ab98159bf1a412d31ff31e0e.1666443387.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+From: Christoph Erhardt <github(a)sicherha.de>
+Date: Sat, 22 Oct 2022 14:41:42 +0200
+Subject: [PATCH 4/4] Fix name lookup for section symbols when `st_shndx ==
+ SHN_XINDEX`
+
+When the section-header index has the escape value `SHN_XINDEX`, the
+actual index must be looked up in the separate `SHT_SYMTAB_SHNDX` table.
+Trying to use `SHN_XINDEX` (= 0xffff) as an index results in an
+out-of-bounds read. The error can be observed when running the
+`x86_64_many-sections.sh` test on RHEL 8 or 9 (but not on Fedora,
+because there the assembler doesn't emit section symbols).
+
+Instead of using `st_shndx` directly, call the pre-existing helper
+method `get_shndx()` to get the correct behaviour.
+
+Signed-off-by: Christoph Erhardt <github(a)sicherha.de>
+---
+ elf/input-files.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/elf/input-files.cc b/elf/input-files.cc
+index 15ccd634..3c5ca619 100644
+--- a/elf/input-files.cc
++++ b/elf/input-files.cc
+@@ -439,7 +439,7 @@ void ObjectFile<E>::initialize_symbols(Context<E> &ctx) {
+
+ std::string_view name;
+ if (esym.st_type == STT_SECTION)
+- name = this->shstrtab.data() + this->elf_sections[esym.st_shndx].sh_name;
++ name = this->shstrtab.data() + this->elf_sections[get_shndx(esym)].sh_name;
+ else
+ name = this->symbol_strtab.data() + esym.st_name;
+
+--
+2.37.3
+
diff --git a/mold.spec b/mold.spec
index 1a4366c..c8e6959 100644
--- a/mold.spec
+++ b/mold.spec
@@ -1,5 +1,5 @@
Name: mold
-Version: 1.5.1
+Version: 1.6.0
Release: 1%{?dist}
Summary: A Modern Linker
@@ -17,11 +17,15 @@ Patch0: tbb-strip-werror.patch
# Allow building against the system-provided `xxhash.h`
Patch2: 0001-Use-system-compatible-include-path-for-xxhash.h.patch
-# Fix unit test failing on ppc64
-Patch3: 0002-ELF-Fix-test-for-PPC64LE.patch
+# Fix test failure on i386 (https://github.com/rui314/mold/issues/794)
+Patch3: 0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
+Patch4: 0003-ELF-i386-Fix-assertion-failure.patch
+
+# Fix test failure on epel8/epel9 (https://github.com/rui314/mold/pull/809)
+Patch5: 0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
# mold can currently produce native binaries for these architectures only
-ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 ppc64le %{riscv32} %{riscv64} sparc64 sparc64v
+ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 %{power64} %{riscv32} %{riscv64} s390x sparc64 sparc64v
BuildRequires: cmake
%if 0%{?el8}
@@ -36,6 +40,9 @@ BuildRequires: openssl-devel
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
+# Required by bundled oneTBB
+BuildRequires: hwloc-devel
+
# The following packages are only required for executing the tests
BuildRequires: clang
BuildRequires: gdb
@@ -104,6 +111,11 @@ fi
%{_mandir}/man1/mold.1*
%changelog
+* Sat Oct 22 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.6.0-1
+- Bump version to 1.6.0
+- Add new supported architectures
+- Drop upstreamed patch
+
* Thu Sep 29 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.5.1-1
- Bump version to 1.5.1 (#2130132)
- Switch to CMake build
diff --git a/sources b/sources
index ce2f44f..99d30c6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mold-1.5.1.tar.gz) = 340a45c5190ce5ba87eaa05238da7c70400bf4a2788a095935b9675593078ad76bbd95e67aa36b3ec683428724a3c6bc27c7e0a69569afce461682dc4bd16b10
+SHA512 (mold-1.6.0.tar.gz) = dcb498da95ee02a08b175861ae24f3793705671670f6f3487eebd3aab2487fd2163fc1747c9ca2fd1c3570a5f1f0bcfd7d4d91bf6a904a1ba098be6cbbe8c857
https://src.fedoraproject.org/rpms/mold/c/8eff4703e522bd023a611881fd20d3d...
1Â year, 5Â months
pagure pushed to rpms/man-pages (rawhide). "Rebase to version 6.01 (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 18:29:54 UTC
From e8ff2707dd9f7bd2bc4ca7fa2dfe83c9e9d70833 Mon Sep 17 00:00:00 2001
From: Lukas Javorsky <ljavorsk(a)redhat.com>
Date: Oct 21 2022 15:45:16 +0000
Subject: Rebase to version 6.01
Resolves: #2135921
---
diff --git a/.gitignore b/.gitignore
index aa46e65..9274e0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@
/man-pages-5.12.tar.xz
/man-pages-5.13.tar.xz
/man-pages-6.00.tar.xz
+/man-pages-6.01.tar.xz
diff --git a/man-pages.spec b/man-pages.spec
index 8c05867..f64efed 100644
--- a/man-pages.spec
+++ b/man-pages.spec
@@ -3,7 +3,7 @@
Summary: Linux kernel and C library user-space interface documentation
Name: man-pages
-Version: 6.00
+Version: 6.01
Release: 1%{?dist}
License: GPL+ and GPLv2+ and BSD and MIT and Copyright only
URL: http://www.kernel.org/doc/man-pages/
@@ -96,6 +96,9 @@ fi
%{_mandir}/man*/*
%changelog
+* Fri Oct 21 2022 Lukas Javorsky <ljavorsk(a)redhat.com> - 6.01-1
+- Rebase to version 6.01
+
* Fri Oct 14 2022 Lukas Javorsky <ljavorsk(a)redhat.com> - 6.00-1
- Rebase to version 6.00
- Patch 22 upstreamed
diff --git a/sources b/sources
index a503ad0..749b5a1 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
SHA512 (man-pages-additional-20140218.tar.xz) = c7874db32a9bdefaea6c6be6549e6e6538fa1d93260bf342dd0d9821fa05754aa79a723e701493c81b2e1f460918429eb9b5edb704b55878b1e5ed585a3ff07d
-SHA512 (man-pages-6.00.tar.xz) = c0286146fed800175316610998ea887568c168bcf3ec9a401209c6c159cedd9258c1e77e513cbe835268b563dd766b3ecc24751c6ab49ebb7ace8c84d8b83e68
+SHA512 (man-pages-6.01.tar.xz) = 93d09380a08c36740dbb2f3f246d190e5467147344b584253a2e0248fa764559008c21bb567f379f6166952ee1635ae3c2145e2a63aaf6d30728ca680d7b57a9
https://src.fedoraproject.org/rpms/man-pages/c/e8ff2707dd9f7bd2bc4ca7fa2d...
1Â year, 5Â months
mtasaka pushed to rpms/xscreensaver (f37).
"demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 17:45:20 UTC
From 700cce750f982622d1219dddfbcd02054250fc9e Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
Date: Oct 22 2022 17:44:11 +0000
Subject: demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb
---
diff --git a/xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch b/xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch
new file mode 100644
index 0000000..29a5874
--- /dev/null
+++ b/xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch
@@ -0,0 +1,33 @@
+From ae526a4276abeccdd0b0c738dea903c5575a52b6 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
+Date: Sun, 23 Oct 2022 02:41:03 +0900
+Subject: [PATCH] demo-Gtk.c/populate_prefs_page: use correct pointer for
+ pref_changed_cb
+
+With xscreensaver 6.05. xscreensaver-settings causes segfault when
+trying to choose another theme for auth window. This is because
+in populate_prefs_page() wrong pointer is passed to pref_changed_cb(),
+then XSCREENSAVER_WINDOW cast complains.
+
+The first line in populate_prefs_page() actually writes what pointer
+should be used - use the same pointer here.
+---
+ driver/demo-Gtk.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
+index 404fc88..aa85923 100644
+--- a/driver/demo-Gtk.c
++++ b/driver/demo-Gtk.c
+@@ -2518,7 +2518,7 @@ populate_prefs_page (state *s)
+ if (! signal_connected_p)
+ {
+ g_signal_connect (G_OBJECT (cbox), "changed",
+- G_CALLBACK (pref_changed_cb), (gpointer) s);
++ G_CALLBACK (pref_changed_cb), (gpointer) s->window);
+ signal_connected_p = TRUE;
+ }
+ }
+--
+2.38.1
+
diff --git a/xscreensaver.spec b/xscreensaver.spec
index cbfd96a..bf760c2 100644
--- a/xscreensaver.spec
+++ b/xscreensaver.spec
@@ -12,7 +12,7 @@
%define split_getimage 1
%endif
-%define fedora_rel 1
+%define fedora_rel 2
%global use_clang_as_cc 0
%global use_clang_analyze 0
@@ -96,6 +96,8 @@ Patch1: xscreensaver-5.45-0001-barcode-glsnake-sanitize-the-names-of-mo
Patch21: xscreensaver-6.05-webcollage-default-nonet.patch
# demo-Gtk.c/main: enable localization again
Patch501: xscreensaver-6.05-0001-demo-Gtk.c-main-enable-localization-again.patch
+# demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb
+Patch502: xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch
# misc: kill gcc warn_unused_result warnings
Patch3607: xscreensaver-5.36-0007-misc-kill-gcc-warn_unused_result-warnings.patch
# Fedora specific
@@ -378,6 +380,7 @@ find . -name \*.c -exec chmod ugo-x {} \;
%__cat %PATCH1 | %__git am
%__cat %PATCH21 | %__git am
%__cat %PATCH501 | %__git am
+%__cat %PATCH502 | %__git am
#%%__cat %PATCH3607 | %__git am
%__cat %PATCH10001 | %__git am
@@ -1186,6 +1189,9 @@ exit 0
%endif
%changelog
+* Sat Oct 22 2022 Mamoru TASAKA <mtasaka(a)fedoraproject.org> - 1:6.05-2
+- demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb
+
* Sat Oct 22 2022 Mamoru TASAKA <mtasaka(a)fedoraproject.org> - 1:6.05-1
- Update to 6.05, now demo using GTK3
https://src.fedoraproject.org/rpms/xscreensaver/c/700cce750f982622d1219dd...
1Â year, 5Â months
mtasaka pushed to rpms/xscreensaver (rawhide).
"demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 17:44:23 UTC
From 700cce750f982622d1219dddfbcd02054250fc9e Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
Date: Oct 22 2022 17:44:11 +0000
Subject: demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb
---
diff --git a/xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch b/xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch
new file mode 100644
index 0000000..29a5874
--- /dev/null
+++ b/xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch
@@ -0,0 +1,33 @@
+From ae526a4276abeccdd0b0c738dea903c5575a52b6 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
+Date: Sun, 23 Oct 2022 02:41:03 +0900
+Subject: [PATCH] demo-Gtk.c/populate_prefs_page: use correct pointer for
+ pref_changed_cb
+
+With xscreensaver 6.05. xscreensaver-settings causes segfault when
+trying to choose another theme for auth window. This is because
+in populate_prefs_page() wrong pointer is passed to pref_changed_cb(),
+then XSCREENSAVER_WINDOW cast complains.
+
+The first line in populate_prefs_page() actually writes what pointer
+should be used - use the same pointer here.
+---
+ driver/demo-Gtk.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c
+index 404fc88..aa85923 100644
+--- a/driver/demo-Gtk.c
++++ b/driver/demo-Gtk.c
+@@ -2518,7 +2518,7 @@ populate_prefs_page (state *s)
+ if (! signal_connected_p)
+ {
+ g_signal_connect (G_OBJECT (cbox), "changed",
+- G_CALLBACK (pref_changed_cb), (gpointer) s);
++ G_CALLBACK (pref_changed_cb), (gpointer) s->window);
+ signal_connected_p = TRUE;
+ }
+ }
+--
+2.38.1
+
diff --git a/xscreensaver.spec b/xscreensaver.spec
index cbfd96a..bf760c2 100644
--- a/xscreensaver.spec
+++ b/xscreensaver.spec
@@ -12,7 +12,7 @@
%define split_getimage 1
%endif
-%define fedora_rel 1
+%define fedora_rel 2
%global use_clang_as_cc 0
%global use_clang_analyze 0
@@ -96,6 +96,8 @@ Patch1: xscreensaver-5.45-0001-barcode-glsnake-sanitize-the-names-of-mo
Patch21: xscreensaver-6.05-webcollage-default-nonet.patch
# demo-Gtk.c/main: enable localization again
Patch501: xscreensaver-6.05-0001-demo-Gtk.c-main-enable-localization-again.patch
+# demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb
+Patch502: xscreensaver-6.05-0002-demo-Gtk.c-populate_prefs_page-use-correct-pointer-f.patch
# misc: kill gcc warn_unused_result warnings
Patch3607: xscreensaver-5.36-0007-misc-kill-gcc-warn_unused_result-warnings.patch
# Fedora specific
@@ -378,6 +380,7 @@ find . -name \*.c -exec chmod ugo-x {} \;
%__cat %PATCH1 | %__git am
%__cat %PATCH21 | %__git am
%__cat %PATCH501 | %__git am
+%__cat %PATCH502 | %__git am
#%%__cat %PATCH3607 | %__git am
%__cat %PATCH10001 | %__git am
@@ -1186,6 +1189,9 @@ exit 0
%endif
%changelog
+* Sat Oct 22 2022 Mamoru TASAKA <mtasaka(a)fedoraproject.org> - 1:6.05-2
+- demo-Gtk.c/populate_prefs_page: use correct pointer for pref_changed_cb
+
* Sat Oct 22 2022 Mamoru TASAKA <mtasaka(a)fedoraproject.org> - 1:6.05-1
- Update to 6.05, now demo using GTK3
https://src.fedoraproject.org/rpms/xscreensaver/c/700cce750f982622d1219dd...
1Â year, 5Â months
sicherha pushed to rpms/mold (f36). "Bump version to 1.6.0"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 17:28:59 UTC
From 8eff4703e522bd023a611881fd20d3dda6e75f59 Mon Sep 17 00:00:00 2001
From: Christoph Erhardt <fedora(a)sicherha.de>
Date: Oct 22 2022 15:26:09 +0000
Subject: Bump version to 1.6.0
---
diff --git a/0002-ELF-Fix-test-for-PPC64LE.patch b/0002-ELF-Fix-test-for-PPC64LE.patch
deleted file mode 100644
index 09f0b5a..0000000
--- a/0002-ELF-Fix-test-for-PPC64LE.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f6f03510d6c19e6009c903fed00294813126db3b Mon Sep 17 00:00:00 2001
-Message-Id: <f6f03510d6c19e6009c903fed00294813126db3b.1664460024.git.github(a)sicherha.de>
-In-Reply-To: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-References: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github(a)sicherha.de>
-From: Rui Ueyama <ruiu(a)bluewhale.systems>
-Date: Thu, 29 Sep 2022 15:41:28 +0800
-Subject: [PATCH 2/2] [ELF] Fix test for PPC64LE
-
-`readelf --symbols` print out auxiliary information after a symbol name
-for PPC64, so something like `foo$` didn't match.
-
- 7: 0000000000000000 80 FUNC GLOBAL DEFAULT 3 main [<localentry>: 8]
- 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .TOC.
- 9: 0000000000000000 72 FUNC GLOBAL DEFAULT 11 foo [<localentry>: 8]
- 10: 0000000000000000 40 FUNC GLOBAL DEFAULT 19 bar
-
-Fixes https://github.com/rui314/mold/issues/739
----
- test/elf/relocatable-archive.sh | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/test/elf/relocatable-archive.sh b/test/elf/relocatable-archive.sh
-index e5544bb8..759cd871 100755
---- a/test/elf/relocatable-archive.sh
-+++ b/test/elf/relocatable-archive.sh
-@@ -38,8 +38,8 @@ ar crs $t/e.a $t/a.o $t/b.o $t/c.o
- ./mold -r -o $t/f.o $t/d.o $t/e.a
-
- readelf --symbols $t/f.o > $t/log
--grep -q 'foo$' $t/log
--grep -q 'bar$' $t/log
--! grep -q 'baz$' $t/log || false
-+grep -q 'foo\b' $t/log
-+grep -q 'bar\b' $t/log
-+! grep -q 'baz\b' $t/log || false
-
- echo OK
---
-2.37.3
-
diff --git a/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
new file mode 100644
index 0000000..8ff0bde
--- /dev/null
+++ b/0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
@@ -0,0 +1,44 @@
+From 2f5b3be6214d8157736e60f68693352a3ffd5a47 Mon Sep 17 00:00:00 2001
+Message-Id: <2f5b3be6214d8157736e60f68693352a3ffd5a47.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 19:33:18 +0800
+Subject: [PATCH 2/3] [ELF][i386] Allow R_386_PC32 after R_386_TLS_{GD,LDM}
+
+I don't know why GCC sometimes creates a PC32 relocation instead of
+PLT32 after a TLS_GD/TLS_LDM. I believe it's strictly speaking a
+violation of the psABI. But we need to handle such input.
+
+Fixes https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 46391844..20563faa 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -485,7 +485,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_GD reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsgd(ctx, sym))
+@@ -498,7 +499,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (u32 ty = rels[i + 1].r_type;
+- ty != R_386_PLT32 && ty != R_386_GOT32 && ty != R_386_GOT32X)
++ ty != R_386_PLT32 && ty != R_386_PC32 &&
++ ty != R_386_GOT32 && ty != R_386_GOT32X)
+ Fatal(ctx) << *this << ": TLS_LDM reloc must be followed by PLT or GOT32";
+
+ if (relax_tlsld(ctx))
+--
+2.37.3
+
diff --git a/0003-ELF-i386-Fix-assertion-failure.patch b/0003-ELF-i386-Fix-assertion-failure.patch
new file mode 100644
index 0000000..2ce9d75
--- /dev/null
+++ b/0003-ELF-i386-Fix-assertion-failure.patch
@@ -0,0 +1,40 @@
+From b6d3255e1a498d5a966bd303eb09390aa24ef596 Mon Sep 17 00:00:00 2001
+Message-Id: <b6d3255e1a498d5a966bd303eb09390aa24ef596.1666197268.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666197268.git.github(a)sicherha.de>
+From: Rui Ueyama <ruiu(a)bluewhale.systems>
+Date: Wed, 19 Oct 2022 20:14:53 +0800
+Subject: [PATCH 3/3] [ELF][i386] Fix assertion failure
+
+https://github.com/rui314/mold/issues/794
+---
+ elf/arch-i386.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc
+index 20563faa..87524fd1 100644
+--- a/elf/arch-i386.cc
++++ b/elf/arch-i386.cc
+@@ -234,7 +234,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax GD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x65, 0xa1, 0, 0, 0, 0, // mov %gs:0, %eax
+ 0x81, 0xe8, 0, 0, 0, 0, // add $val, %eax
+@@ -266,7 +267,8 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
+ } else {
+ // Relax LD to LE
+ switch (rels[i + 1].r_type) {
+- case R_386_PLT32: {
++ case R_386_PLT32:
++ case R_386_PC32: {
+ static const u8 insn[] = {
+ 0x31, 0xc0, // xor %eax, %eax
+ 0x65, 0x8b, 0x00, // mov %gs:(%eax), %eax
+--
+2.37.3
+
diff --git a/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
new file mode 100644
index 0000000..54d5859
--- /dev/null
+++ b/0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
@@ -0,0 +1,40 @@
+From 8bfdf07e71706162ab98159bf1a412d31ff31e0e Mon Sep 17 00:00:00 2001
+Message-Id: <8bfdf07e71706162ab98159bf1a412d31ff31e0e.1666443387.git.github(a)sicherha.de>
+In-Reply-To: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+References: <6c0c571d629d924e3f59d8710de6589848204e17.1666443387.git.github(a)sicherha.de>
+From: Christoph Erhardt <github(a)sicherha.de>
+Date: Sat, 22 Oct 2022 14:41:42 +0200
+Subject: [PATCH 4/4] Fix name lookup for section symbols when `st_shndx ==
+ SHN_XINDEX`
+
+When the section-header index has the escape value `SHN_XINDEX`, the
+actual index must be looked up in the separate `SHT_SYMTAB_SHNDX` table.
+Trying to use `SHN_XINDEX` (= 0xffff) as an index results in an
+out-of-bounds read. The error can be observed when running the
+`x86_64_many-sections.sh` test on RHEL 8 or 9 (but not on Fedora,
+because there the assembler doesn't emit section symbols).
+
+Instead of using `st_shndx` directly, call the pre-existing helper
+method `get_shndx()` to get the correct behaviour.
+
+Signed-off-by: Christoph Erhardt <github(a)sicherha.de>
+---
+ elf/input-files.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/elf/input-files.cc b/elf/input-files.cc
+index 15ccd634..3c5ca619 100644
+--- a/elf/input-files.cc
++++ b/elf/input-files.cc
+@@ -439,7 +439,7 @@ void ObjectFile<E>::initialize_symbols(Context<E> &ctx) {
+
+ std::string_view name;
+ if (esym.st_type == STT_SECTION)
+- name = this->shstrtab.data() + this->elf_sections[esym.st_shndx].sh_name;
++ name = this->shstrtab.data() + this->elf_sections[get_shndx(esym)].sh_name;
+ else
+ name = this->symbol_strtab.data() + esym.st_name;
+
+--
+2.37.3
+
diff --git a/mold.spec b/mold.spec
index 1a4366c..c8e6959 100644
--- a/mold.spec
+++ b/mold.spec
@@ -1,5 +1,5 @@
Name: mold
-Version: 1.5.1
+Version: 1.6.0
Release: 1%{?dist}
Summary: A Modern Linker
@@ -17,11 +17,15 @@ Patch0: tbb-strip-werror.patch
# Allow building against the system-provided `xxhash.h`
Patch2: 0001-Use-system-compatible-include-path-for-xxhash.h.patch
-# Fix unit test failing on ppc64
-Patch3: 0002-ELF-Fix-test-for-PPC64LE.patch
+# Fix test failure on i386 (https://github.com/rui314/mold/issues/794)
+Patch3: 0002-ELF-i386-Allow-R_386_PC32-after-R_386_TLS_-GD-LDM.patch
+Patch4: 0003-ELF-i386-Fix-assertion-failure.patch
+
+# Fix test failure on epel8/epel9 (https://github.com/rui314/mold/pull/809)
+Patch5: 0004-Fix-name-lookup-for-section-symbols-when-st_shndx-SH.patch
# mold can currently produce native binaries for these architectures only
-ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 ppc64le %{riscv32} %{riscv64} sparc64 sparc64v
+ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 %{power64} %{riscv32} %{riscv64} s390x sparc64 sparc64v
BuildRequires: cmake
%if 0%{?el8}
@@ -36,6 +40,9 @@ BuildRequires: openssl-devel
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
+# Required by bundled oneTBB
+BuildRequires: hwloc-devel
+
# The following packages are only required for executing the tests
BuildRequires: clang
BuildRequires: gdb
@@ -104,6 +111,11 @@ fi
%{_mandir}/man1/mold.1*
%changelog
+* Sat Oct 22 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.6.0-1
+- Bump version to 1.6.0
+- Add new supported architectures
+- Drop upstreamed patch
+
* Thu Sep 29 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.5.1-1
- Bump version to 1.5.1 (#2130132)
- Switch to CMake build
diff --git a/sources b/sources
index ce2f44f..99d30c6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mold-1.5.1.tar.gz) = 340a45c5190ce5ba87eaa05238da7c70400bf4a2788a095935b9675593078ad76bbd95e67aa36b3ec683428724a3c6bc27c7e0a69569afce461682dc4bd16b10
+SHA512 (mold-1.6.0.tar.gz) = dcb498da95ee02a08b175861ae24f3793705671670f6f3487eebd3aab2487fd2163fc1747c9ca2fd1c3570a5f1f0bcfd7d4d91bf6a904a1ba098be6cbbe8c857
https://src.fedoraproject.org/rpms/mold/c/8eff4703e522bd023a611881fd20d3d...
1Â year, 5Â months
catanzaro pushed to rpms/xdg-desktop-portal (rawhide). "Remove
Recommends: flatpak (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-10-22 17:25:59 UTC
From 8a4cfb93326829932b6d143fe116b9659bf073e7 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro(a)redhat.com>
Date: Oct 22 2022 17:24:54 +0000
Subject: Remove Recommends: flatpak
This is no longer needed by the notification portal since 1.15.0.
---
diff --git a/xdg-desktop-portal.spec b/xdg-desktop-portal.spec
index 972eb9b..628083c 100644
--- a/xdg-desktop-portal.spec
+++ b/xdg-desktop-portal.spec
@@ -26,7 +26,6 @@ BuildRequires: pkgconfig(libsystemd)
BuildRequires: /usr/bin/xmlto
Requires: dbus
-Recommends: flatpak
Requires: geoclue2 >= %{geoclue_version}
Requires: glib2%{?_isa} >= %{glib_version}
Recommends: pipewire >= %{pipewire_version}
https://src.fedoraproject.org/rpms/xdg-desktop-portal/c/8a4cfb93326829932...
1Â year, 5Â months