- Update to version 2.3.3

* --dynamic-list has different semantics for executables and DSOs. Previously,
    mold implemented only the semantics for executables, causing issues with
    libraries such as musl that used this option. mold now handles the option for
    DSOs correctly. (da3f5dd)
  * Old object files often contain .ctors and .dtors sections, which hold function
    pointers for initializing and finalizing processes, respectively. Their roles
    have been superseded by .init_array and .fini_array on most targets. mold worked
    functioned correctly as long as input object files consistently use the old or
    the new sections. However, mixing object files that contain both types of
    initializers/finalizers resulted in some functions not being executed. This
    issue has been fixed. (3f88964)
  * --defsym can cause the linker to crash if a given symbol is not defined. The
    crash bug has been fixed. (ff3d54d)
  * [POWER10] On rare occasions, pointers statically initialized to functions could
    be left as null pointers. This bug has been fixed. (31c3b53)
- Remove upstreamed patch power10-fix.patch.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=108
This commit is contained in:
Martin Liška 2023-11-14 15:10:38 +00:00 committed by Git OBS Bridge
parent f40d5bcc2d
commit 0c21be0759
5 changed files with 25 additions and 34 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db172c0e97606565a81e37995bf5c911606d3f3b9f3829e92cd26985c9b0ed3b
size 9970530

3
mold-2.3.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dcba90d5ee852ececb3a1a70110bb2d385079dcd1aa103e970296683c642f856
size 9965345

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Tue Nov 14 14:57:48 UTC 2023 - Martin Liška <martin.liska@hey.com>
- Update to version 2.3.3
* --dynamic-list has different semantics for executables and DSOs. Previously,
mold implemented only the semantics for executables, causing issues with
libraries such as musl that used this option. mold now handles the option for
DSOs correctly. (da3f5dd)
* Old object files often contain .ctors and .dtors sections, which hold function
pointers for initializing and finalizing processes, respectively. Their roles
have been superseded by .init_array and .fini_array on most targets. mold worked
functioned correctly as long as input object files consistently use the old or
the new sections. However, mixing object files that contain both types of
initializers/finalizers resulted in some functions not being executed. This
issue has been fixed. (3f88964)
* --defsym can cause the linker to crash if a given symbol is not defined. The
crash bug has been fixed. (ff3d54d)
* [POWER10] On rare occasions, pointers statically initialized to functions could
be left as null pointers. This bug has been fixed. (31c3b53)
- Remove upstreamed patch power10-fix.patch.
-------------------------------------------------------------------
Mon Nov 6 18:20:07 UTC 2023 - Martin Liška <martin.liska@hey.com>

View File

@ -17,7 +17,7 @@
Name: mold
Version: 2.3.2
Version: 2.3.3
Release: 0
Summary: A Modern Linker (mold)
License: MIT
@ -25,7 +25,6 @@ Group: Development/Tools/Building
URL: https://github.com/rui314/mold
Source: https://github.com/rui314/mold/archive/v%{version}/mold-%{version}.tar.gz
Patch0: build-blake-3-as-static.patch
Patch1: power10-fix.patch
BuildRequires: cmake
%if %{suse_version} < 1550
BuildRequires: gcc11-c++

View File

@ -1,29 +0,0 @@
From 31c3b5397b91ea058dbd9e773e2a2c397f17558e Mon Sep 17 00:00:00 2001
From: Rui Ueyama <ruiu@cs.stanford.edu>
Date: Mon, 6 Nov 2023 13:25:27 +0900
Subject: [PATCH] [POWER10] Emit dynamic relocation for ifunc
Previously, we didn't emit a dynamic relocation for a statically-
initialized function pointer pointing to an ifunc on POWER10, e.g.
int fn() __attribute__((ifunc("resolve_fn")));
void *ptr = fn;
Fixes https://github.com/rui314/mold/issues/1142
---
elf/input-sections.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elf/input-sections.cc b/elf/input-sections.cc
index 864e72bb1..70187ef39 100644
--- a/elf/input-sections.cc
+++ b/elf/input-sections.cc
@@ -274,7 +274,7 @@ static Action get_absrel_action(Context<E> &ctx, Symbol<E> &sym) {
template <typename E>
static Action get_dyn_absrel_action(Context<E> &ctx, Symbol<E> &sym) {
if (sym.is_ifunc())
- return ctx.arg.pic ? IFUNC_DYNREL : NONE;
+ return sym.is_pde_ifunc(ctx) ? NONE : IFUNC_DYNREL;
// This is a decision table for absolute relocations for the pointer
// size data (e.g. R_X86_64_64). Unlike the absrel_table, we can emit