Bump version to 1.3.0

This commit is contained in:
Christoph Erhardt 2022-06-18 21:46:53 +02:00
parent 71d4156364
commit aebfbaa408
6 changed files with 45 additions and 137 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/mold-1.2.1.tar.gz
/mold-1.3.0.tar.gz

View File

@ -1,41 +0,0 @@
From 339ce3afe5ebbcc924df431153a0b8fc549b9dd8 Mon Sep 17 00:00:00 2001
Message-Id: <339ce3afe5ebbcc924df431153a0b8fc549b9dd8.1651330992.git.github@sicherha.de>
From: Rui Ueyama <ruiu@cs.stanford.edu>
Date: Sat, 30 Apr 2022 12:06:39 +0800
Subject: [PATCH 1/3] [ELF][LTO] Fix LTO on 32-bit hosts
`off_t` is either an alias for `off32_t` or for `off64_t` on a 32-bit
machine. `off32_t` is the default. But it looks like LLVM gold plugin
is always compiled with `off64_t`.
Because of this difference, the offset of the `handle` member in
`PluginInputFile` differed between mold and LLVMgold.so. mold thought
that the member was at offset 16 of the struct, while LLVMgold.so
thought that it's at offset 24.
That caused a mysterious crash when LLVMgold tries to access the
`handle` member.
Fixes https://github.com/rui314/mold/issues/483
---
lto.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lto.h b/lto.h
index c7a73698..03ab340f 100644
--- a/lto.h
+++ b/lto.h
@@ -73,8 +73,8 @@ enum PluginOutputFileType {
struct PluginInputFile {
const char *name;
int fd;
- off_t offset;
- off_t filesize;
+ uint64_t offset;
+ uint64_t filesize;
void *handle;
};
--
2.35.1

View File

@ -1,25 +1,25 @@
From 7cfbb9c4895e51ab8673b6a3f14c82be49b023c8 Mon Sep 17 00:00:00 2001
Message-Id: <7cfbb9c4895e51ab8673b6a3f14c82be49b023c8.1651339128.git.github@sicherha.de>
From 5cb5f63ea2f2fc6d6ea24a3a9f1e73f6fc6c9fc9 Mon Sep 17 00:00:00 2001
Message-Id: <5cb5f63ea2f2fc6d6ea24a3a9f1e73f6fc6c9fc9.1655550664.git.github@sicherha.de>
From: Christoph Erhardt <github@sicherha.de>
Date: Fri, 29 Apr 2022 21:44:33 +0200
Subject: [PATCH] Skip tests that fail on i686 and armv7l
Subject: [PATCH] Skip tests that fail on armv7l
---
test/elf/exception.sh | 2 ++
test/elf/gdb-index-compress-output.sh | 3 +++
test/elf/gdb-index-dwarf2.sh | 3 +++
test/elf/gdb-index-dwarf3.sh | 3 +++
test/elf/gdb-index-dwarf4.sh | 3 +++
test/elf/gdb-index-dwarf5.sh | 3 +++
test/elf/gdb-index-compress-output.sh | 1 +
test/elf/gdb-index-dwarf2.sh | 1 +
test/elf/gdb-index-dwarf3.sh | 1 +
test/elf/gdb-index-dwarf4.sh | 1 +
test/elf/gdb-index-dwarf5.sh | 1 +
test/elf/hello-static.sh | 2 ++
test/elf/ifunc-static.sh | 2 ++
8 files changed, 21 insertions(+)
8 files changed, 11 insertions(+)
diff --git a/test/elf/exception.sh b/test/elf/exception.sh
index 5df54b14..a4138103 100755
index 3288c783..2e9f02f9 100755
--- a/test/elf/exception.sh
+++ b/test/elf/exception.sh
@@ -14,6 +14,8 @@ mold="$(pwd)/mold"
@@ -13,6 +13,8 @@ cd "$(dirname "$0")"/../..
t=out/test/elf/$testname
mkdir -p $t
@ -29,80 +29,70 @@ index 5df54b14..a4138103 100755
int main() {
try {
diff --git a/test/elf/gdb-index-compress-output.sh b/test/elf/gdb-index-compress-output.sh
index 05bfabd2..c22792ae 100755
index 926f70df..62eda85c 100755
--- a/test/elf/gdb-index-compress-output.sh
+++ b/test/elf/gdb-index-compress-output.sh
@@ -16,6 +16,9 @@ mkdir -p $t
@@ -15,6 +15,7 @@ mkdir -p $t
[ $MACHINE = $(uname -m) ] || { echo skipped; exit; }
+[ $MACHINE = armv7l ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
+
which gdb >& /dev/null || { echo skipped; exit; }
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
cat <<EOF | $CC -c -o $t/a.o -fPIC -g -ggnu-pubnames -gdwarf-4 -xc - -ffunction-sections
which gdb >& /dev/null || { echo skipped; exit; }
diff --git a/test/elf/gdb-index-dwarf2.sh b/test/elf/gdb-index-dwarf2.sh
index 8e15c8e8..b6e6297e 100755
index 0ee1449c..d2efba9c 100755
--- a/test/elf/gdb-index-dwarf2.sh
+++ b/test/elf/gdb-index-dwarf2.sh
@@ -16,6 +16,9 @@ mkdir -p $t
@@ -15,6 +15,7 @@ mkdir -p $t
[ $MACHINE = $(uname -m) ] || { echo skipped; exit; }
+[ $MACHINE = armv7l ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
+
which gdb >& /dev/null || { echo skipped; exit; }
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
echo 'int main() {}' | $CC -o /dev/null -xc -gdwarf-2 -g - >& /dev/null ||
which gdb >& /dev/null || { echo skipped; exit; }
diff --git a/test/elf/gdb-index-dwarf3.sh b/test/elf/gdb-index-dwarf3.sh
index 727dfcbe..466f9597 100755
index 600adcf1..4d29416c 100755
--- a/test/elf/gdb-index-dwarf3.sh
+++ b/test/elf/gdb-index-dwarf3.sh
@@ -16,6 +16,9 @@ mkdir -p $t
@@ -15,6 +15,7 @@ mkdir -p $t
[ $MACHINE = $(uname -m) ] || { echo skipped; exit; }
+[ $MACHINE = armv7l ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
+
which gdb >& /dev/null || { echo skipped; exit; }
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
echo 'int main() {}' | $CC -o /dev/null -xc -gdwarf-3 -g - >& /dev/null ||
which gdb >& /dev/null || { echo skipped; exit; }
diff --git a/test/elf/gdb-index-dwarf4.sh b/test/elf/gdb-index-dwarf4.sh
index 79ae5d1a..5512cd27 100755
index a248fbcd..0df17625 100755
--- a/test/elf/gdb-index-dwarf4.sh
+++ b/test/elf/gdb-index-dwarf4.sh
@@ -16,6 +16,9 @@ mkdir -p $t
@@ -15,6 +15,7 @@ mkdir -p $t
[ $MACHINE = $(uname -m) ] || { echo skipped; exit; }
+[ $MACHINE = armv7l ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
+
which gdb >& /dev/null || { echo skipped; exit; }
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
echo 'int main() {}' | $CC -o /dev/null -xc -gdwarf-4 -g - >& /dev/null ||
which gdb >& /dev/null || { echo skipped; exit; }
diff --git a/test/elf/gdb-index-dwarf5.sh b/test/elf/gdb-index-dwarf5.sh
index 02c0249d..09d20907 100755
index ee33e8d0..01d324b6 100755
--- a/test/elf/gdb-index-dwarf5.sh
+++ b/test/elf/gdb-index-dwarf5.sh
@@ -16,6 +16,9 @@ mkdir -p $t
@@ -15,6 +15,7 @@ mkdir -p $t
[ $MACHINE = $(uname -m) ] || { echo skipped; exit; }
+[ $MACHINE = armv7l ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
+
which gdb >& /dev/null || { echo skipped; exit; }
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
echo 'int main() {}' | $CC -o /dev/null -xc -gdwarf-5 -g - >& /dev/null ||
which gdb >& /dev/null || { echo skipped; exit; }
diff --git a/test/elf/hello-static.sh b/test/elf/hello-static.sh
index 5780b88b..05c60f91 100755
index 62dce63c..6c1dde72 100755
--- a/test/elf/hello-static.sh
+++ b/test/elf/hello-static.sh
@@ -14,6 +14,8 @@ mold="$(pwd)/mold"
@@ -13,6 +13,8 @@ cd "$(dirname "$0")"/../..
t=out/test/elf/$testname
mkdir -p $t
@ -112,10 +102,10 @@ index 5780b88b..05c60f91 100755
#include <stdio.h>
diff --git a/test/elf/ifunc-static.sh b/test/elf/ifunc-static.sh
index e7b0b8c8..150dc921 100755
index 295350a3..7f1d2686 100755
--- a/test/elf/ifunc-static.sh
+++ b/test/elf/ifunc-static.sh
@@ -17,6 +17,8 @@ mkdir -p $t
@@ -16,6 +16,8 @@ mkdir -p $t
# IFUNC is not supported on RISC-V yet
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
@ -125,5 +115,5 @@ index e7b0b8c8..150dc921 100755
echo 'int main() {}' | $CC -o $t/exe -xc -
readelf --dynamic $t/exe | grep -q ld-musl && { echo OK; exit; }
--
2.35.1
2.36.1

View File

@ -1,41 +0,0 @@
From 9a48159c5aa7c79fc7d4ac41fa94c1ccd3708ea6 Mon Sep 17 00:00:00 2001
Message-Id: <9a48159c5aa7c79fc7d4ac41fa94c1ccd3708ea6.1651330992.git.github@sicherha.de>
In-Reply-To: <339ce3afe5ebbcc924df431153a0b8fc549b9dd8.1651330992.git.github@sicherha.de>
References: <339ce3afe5ebbcc924df431153a0b8fc549b9dd8.1651330992.git.github@sicherha.de>
From: Christoph Erhardt <github@sicherha.de>
Date: Thu, 28 Apr 2022 23:48:29 +0200
Subject: [PATCH 2/3] Skip `-static-pie` tests on i686, not just on i386
Signed-off-by: Christoph Erhardt <github@sicherha.de>
---
test/elf/hello-static-pie.sh | 1 +
test/elf/ifunc-static-pie.sh | 1 +
2 files changed, 2 insertions(+)
diff --git a/test/elf/hello-static-pie.sh b/test/elf/hello-static-pie.sh
index 0921a876..6970ef9d 100755
--- a/test/elf/hello-static-pie.sh
+++ b/test/elf/hello-static-pie.sh
@@ -16,6 +16,7 @@ mkdir -p $t
# We need to implement R_386_GOT32X relaxation to support PIE on i386
[ $MACHINE = i386 ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
[ $MACHINE = aarch64 ] && { echo skipped; exit; }
diff --git a/test/elf/ifunc-static-pie.sh b/test/elf/ifunc-static-pie.sh
index 4edcfabe..5977ee53 100755
--- a/test/elf/ifunc-static-pie.sh
+++ b/test/elf/ifunc-static-pie.sh
@@ -16,6 +16,7 @@ mkdir -p $t
# We need to implement R_386_GOT32X relaxation to support PIE on i386
[ $MACHINE = i386 ] && { echo skipped; exit; }
+[ $MACHINE = i686 ] && { echo skipped; exit; }
# RISCV64 does not support IFUNC yet
[ $MACHINE = riscv64 ] && { echo skipped; exit; }
--
2.35.1

View File

@ -1,5 +1,5 @@
Name: mold
Version: 1.2.1
Version: 1.3.0
Release: 1%{?dist}
Summary: A Modern Linker
@ -14,12 +14,8 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# in the Fedora tbb package)
Patch0: tbb-strip-werror.patch
# Fix LTO on 32-bit hosts
Patch1: 0001-ELF-LTO-Fix-LTO-on-32-bit-hosts.patch
# Skip failing tests on i686 and armv7l
Patch2: 0002-Skip-static-pie-tests-on-i686-not-just-on-i386.patch
Patch3: 0003-Skip-tests-that-fail-on-i686-and-armv7l.patch
# Skip failing tests on armv7l
Patch1: 0001-Skip-tests-that-fail-on-armv7l.patch
# mold can currently produce native binaries for these architectures only
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 riscv64
@ -109,6 +105,10 @@ fi
%{_mandir}/man1/mold.1*
%changelog
* Sat Jun 18 2022 Christoph Erhardt <fedora@sicherha.de> - 1.3.0-1
- Bump version to 1.3.0 (#2098316)
- Drop upstreamed patches
* Sat Apr 30 2022 Christoph Erhardt <fedora@sicherha.de> - 1.2.1-1
- Bump version to 1.2.1
- Drop upstreamed patch

View File

@ -1 +1 @@
SHA512 (mold-1.2.1.tar.gz) = fc39674b00119d09b3275ed7232356f0b25dad1a0f3a498f9db1a4835b6d4f9ea637ca9a643a05591ea895e8751d9bee43cdcb42303beb082462e76ddb42a0f1
SHA512 (mold-1.3.0.tar.gz) = c9da8ece83049afcb815444c81d090a7bdead85b88898460cd94cfc83766b54793d3aa15ce7ce3bd8070a080d1241684c15ad81485ec39cfef768360c574964a