From 6f2035fba262208b8b373271a62840c17cb875dd16aede4500f3f2fecaa81d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Fri, 1 Mar 2024 14:53:28 +0000 Subject: [PATCH 1/3] - Update to version 2.4.1 * mold 2.4.0 or prior may promote weak dynamic symbols to strong ones under a rare circumstance, which caused "undefined symbol" error at runtime. The bug has been fixed. (50bdf39) * Previously, if two or more VERSION clauses in a version script match to the same symbol, the first one took precedence. This was incompatible with GNU ld, which gives the last one the highest priority, causing a Qt library link failure. This compatibility issue has been resolved. (e1e16bf) * By default, we demangle symbols in error messages so that they are easier to read. Previously, Rust symbols could accidentally be demangled as C++ symbols. Now, mold attempts to demangle symbols as Rust ones only for object files created by rustc. (ea9864b) * [RISC-V] mold now relaxes a GOT-load instruction sequence into a direct address materialization if the symbol address is known at link time. This relaxation eliminates one memory load and slightly improves the linked program's performance. (2ccaa81) * [PowerPC64 ELFv2] GCC may emit references to _savegpr0_*, _restgpr0_*, _savegpr1_* and _restgpr1_* symbols for the -Os command line option to optimize the output for code size. These symbols are not defined by any object file and expected to be synthesized by the linker. mold didn't use to synthesize these symbols, and therefore object files created with -Os sometimes failed due to missing symbol errors. Now, mold synthesizes these symbols. (d4ff48a) * [PowerPC64] R_PPC64_DTPREL16_LO_DS relocation type has now been supported. (6d8e6af) * [Illumos] On Illumos OS, absolute symbols in DSOs need to be resolved at runtime because the dynamic linker treats such symbols in a special manner. Previously, mold directly used absolute symbol addresses at link-time and did not place them into the dynamic symbol table. That optimization has been removed for compatibility with Illumos. (bed5b17, 7f8d77d) OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=112 --- mold-2.4.0.tar.gz | 3 --- mold-2.4.1.tar.gz | 3 +++ mold.changes | 33 +++++++++++++++++++++++++++++++++ mold.spec | 10 +++++----- 4 files changed, 41 insertions(+), 8 deletions(-) delete mode 100644 mold-2.4.0.tar.gz create mode 100644 mold-2.4.1.tar.gz diff --git a/mold-2.4.0.tar.gz b/mold-2.4.0.tar.gz deleted file mode 100644 index 58690d6..0000000 --- a/mold-2.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be65f3d785d32ece7b3204ecaa57810847fdd25c232cf704cbfff2dafb1ac107 -size 9974233 diff --git a/mold-2.4.1.tar.gz b/mold-2.4.1.tar.gz new file mode 100644 index 0000000..f66bc5b --- /dev/null +++ b/mold-2.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9853d007d6a1b4f3e36b7314346751f4cc91bc43c76e30db51709b53b44dd68 +size 9957259 diff --git a/mold.changes b/mold.changes index 6dbe668..6ac3429 100644 --- a/mold.changes +++ b/mold.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Fri Mar 1 14:47:15 UTC 2024 - Martin Liška + +- Update to version 2.4.1 + * mold 2.4.0 or prior may promote weak dynamic symbols to strong ones under a rare + circumstance, which caused "undefined symbol" error at runtime. The bug has been + fixed. (50bdf39) + * Previously, if two or more VERSION clauses in a version script match to the same + symbol, the first one took precedence. This was incompatible with GNU ld, which + gives the last one the highest priority, causing a Qt library link failure. This + compatibility issue has been resolved. (e1e16bf) + * By default, we demangle symbols in error messages so that they are easier to + read. Previously, Rust symbols could accidentally be demangled as C++ symbols. + Now, mold attempts to demangle symbols as Rust ones only for object files + created by rustc. (ea9864b) + * [RISC-V] mold now relaxes a GOT-load instruction sequence into a direct address + materialization if the symbol address is known at link time. This relaxation + eliminates one memory load and slightly improves the linked program's + performance. (2ccaa81) + * [PowerPC64 ELFv2] GCC may emit references to _savegpr0_*, _restgpr0_*, + _savegpr1_* and _restgpr1_* symbols for the -Os command line option to optimize + the output for code size. These symbols are not defined by any object file and + expected to be synthesized by the linker. mold didn't use to synthesize these + symbols, and therefore object files created with -Os sometimes failed due to + missing symbol errors. Now, mold synthesizes these symbols. (d4ff48a) + * [PowerPC64] R_PPC64_DTPREL16_LO_DS relocation type has now been supported. + (6d8e6af) + * [Illumos] On Illumos OS, absolute symbols in DSOs need to be resolved at runtime + because the dynamic linker treats such symbols in a special manner. Previously, + mold directly used absolute symbol addresses at link-time and did not place them + into the dynamic symbol table. That optimization has been removed for + compatibility with Illumos. (bed5b17, 7f8d77d) + ------------------------------------------------------------------- Thu Nov 30 05:33:24 UTC 2023 - Martin Liška diff --git a/mold.spec b/mold.spec index d8af0b4..8cc9daf 100644 --- a/mold.spec +++ b/mold.spec @@ -1,7 +1,7 @@ # # spec file for package mold # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: mold -Version: 2.4.0 +Version: 2.4.1 Release: 0 Summary: A Modern Linker (mold) License: MIT @@ -108,8 +108,8 @@ fi %{_libdir}/mold/mold-wrapper.so %{_mandir}/man1/mold.1.gz %{_mandir}/man1/ld.mold.1.gz -%dir /usr/share/doc/mold -%doc /usr/share/doc/mold/LICENSE -%doc /usr/share/doc/mold/LICENSE.third-party +%dir %{_docdir}/mold +%doc %{_docdir}/mold/LICENSE +%doc %{_docdir}/mold/LICENSE.third-party %changelog From 51ef3757f3b8188e6980418b68c3b8ca84ce231de2e5fdef110602bfa53420a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Fri, 1 Mar 2024 16:17:49 +0000 Subject: [PATCH 2/3] - Align path for document installation between openSUSE versions. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=113 --- mold.changes | 5 +++++ mold.spec | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mold.changes b/mold.changes index 6ac3429..24d1152 100644 --- a/mold.changes +++ b/mold.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 1 16:17:35 UTC 2024 - Martin Liška + +- Align path for document installation between openSUSE versions. + ------------------------------------------------------------------- Fri Mar 1 14:47:15 UTC 2024 - Martin Liška diff --git a/mold.spec b/mold.spec index 8cc9daf..1db69a5 100644 --- a/mold.spec +++ b/mold.spec @@ -71,7 +71,10 @@ build time especially in rapid debug-edit-rebuild cycles. export CC=gcc-11 export CXX=g++-11 %endif -%cmake %{build_args} +%cmake %{build_args} \ +%if 0%{?suse_version} < 1600 + -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} +%endif %cmake_build %install From 8bf5ea8229dc8e2b4bacac7c8babd21bc9462bb62979e1055cdd3d1c0f19b2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Fri, 1 Mar 2024 16:20:22 +0000 Subject: [PATCH 3/3] Fix package build OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=114 --- mold.spec | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mold.spec b/mold.spec index 1db69a5..dce135c 100644 --- a/mold.spec +++ b/mold.spec @@ -50,8 +50,8 @@ BuildRequires: zlib-devel BuildRequires: zstd PreReq: update-alternatives -%if %{suse_version} < 1550 -%define build_args -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_MIMALLOC=OFF +%if %{suse_version} < 1600 +%define build_args -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_MIMALLOC=OFF -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} %else %define build_args -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_SYSTEM_TBB=ON %endif @@ -71,10 +71,7 @@ build time especially in rapid debug-edit-rebuild cycles. export CC=gcc-11 export CXX=g++-11 %endif -%cmake %{build_args} \ -%if 0%{?suse_version} < 1600 - -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} -%endif +%cmake %{build_args} %cmake_build %install