From 025aec0a9edb16b5a274dd02ca300dc264385b14 Mon Sep 17 00:00:00 2001 From: idealseal Date: Tue, 8 Jul 2025 09:26:33 +0000 Subject: [PATCH] sys-devel/mold: drop unused patches Signed-off-by: idealseal Part-of: https://github.com/gentoo/gentoo/pull/42879 Closes: https://github.com/gentoo/gentoo/pull/42879 Signed-off-by: Sam James --- .../files/mold-2.38.1-default-symver.patch | 70 ------------------- .../mold/files/mold-2.38.1-omagic-loop.patch | 28 -------- 2 files changed, 98 deletions(-) delete mode 100644 sys-devel/mold/files/mold-2.38.1-default-symver.patch delete mode 100644 sys-devel/mold/files/mold-2.38.1-omagic-loop.patch diff --git a/sys-devel/mold/files/mold-2.38.1-default-symver.patch b/sys-devel/mold/files/mold-2.38.1-default-symver.patch deleted file mode 100644 index 4f5e874db4206..0000000000000 --- a/sys-devel/mold/files/mold-2.38.1-default-symver.patch +++ /dev/null @@ -1,70 +0,0 @@ -https://github.com/rui314/mold/commit/8bae43b842f1ded33830a95b8fc7ba8b0a53086f - -From 8bae43b842f1ded33830a95b8fc7ba8b0a53086f Mon Sep 17 00:00:00 2001 -From: Rui Ueyama -Date: Wed, 30 Apr 2025 20:37:14 +0900 -Subject: [PATCH] Make --default-symver work with version scripts - -Previously, symbols specified with the `global:` label were unversioned -even if --default-symver was given. Now, such symbols are versioned with -the output file's soname. - -Fixes https://github.com/rui314/mold/issues/1448 ---- - src/cmdline.cc | 2 -- - src/output-chunks.cc | 8 ++++++++ - test/default-symver-version-script.sh | 11 +++++++++++ - 3 files changed, 19 insertions(+), 2 deletions(-) - create mode 100755 test/default-symver-version-script.sh - -diff --git a/src/cmdline.cc b/src/cmdline.cc -index d27f6bdc3d..a6471d5bba 100644 ---- a/src/cmdline.cc -+++ b/src/cmdline.cc -@@ -1510,9 +1510,7 @@ std::vector parse_nonpositional_args(Context &ctx) { - std::string ver = ctx.arg.soname; - if (ver.empty()) - ver = path_filename(ctx.arg.output); -- - ctx.arg.version_definitions.push_back(ver); -- ctx.default_version = VER_NDX_LAST_RESERVED + 1; - } - - for (std::string_view path : version_scripts) { -diff --git a/src/output-chunks.cc b/src/output-chunks.cc -index 605f3c2f50..838ee838f3 100644 ---- a/src/output-chunks.cc -+++ b/src/output-chunks.cc -@@ -2632,6 +2632,14 @@ void VerdefSection::construct(Context &ctx) { - if (ctx.arg.version_definitions.empty()) - return; - -+ // Handle --default-symver -+ if (ctx.arg.default_symver) -+ for (Symbol *sym : ctx.dynsym->symbols) -+ if (sym && !sym->file->is_dso) -+ if (u16 ver = sym->ver_idx; -+ ver == VER_NDX_GLOBAL || ver == VER_NDX_UNSPECIFIED) -+ sym->ver_idx = VER_NDX_LAST_RESERVED + 1; -+ - // Resize .gnu.version and write to it - ctx.versym->contents.resize(ctx.dynsym->symbols.size(), VER_NDX_GLOBAL); - ctx.versym->contents[0] = VER_NDX_LOCAL; -diff --git a/test/default-symver-version-script.sh b/test/default-symver-version-script.sh -new file mode 100755 -index 0000000000..5b3d22b24f ---- /dev/null -+++ b/test/default-symver-version-script.sh -@@ -0,0 +1,11 @@ -+#!/bin/bash -+. $(dirname $0)/common.inc -+ -+cat < $t/b.ver -+ -+$CC -B. -o $t/c.so -shared $t/a.o -Wl,--default-symver -Wl,--version-script=$t/b.ver -+readelf --dyn-syms $t/c.so | grep -F ' foo@@c.so' - diff --git a/sys-devel/mold/files/mold-2.38.1-omagic-loop.patch b/sys-devel/mold/files/mold-2.38.1-omagic-loop.patch deleted file mode 100644 index 44c8e3e391029..0000000000000 --- a/sys-devel/mold/files/mold-2.38.1-omagic-loop.patch +++ /dev/null @@ -1,28 +0,0 @@ -https://github.com/rui314/mold/issues/1447 -https://github.com/rui314/mold/commit/83dd35397955bd179723ce31d52fc30836a65eed - -From 83dd35397955bd179723ce31d52fc30836a65eed Mon Sep 17 00:00:00 2001 -From: Rui Ueyama -Date: Thu, 1 May 2025 09:33:52 +0900 -Subject: [PATCH] Prevent oscillation when computing the size of the phdr - -Fixes https://github.com/rui314/mold/issues/1447 ---- - src/passes.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/passes.cc b/src/passes.cc -index a2f1ed3347..5845dd6a19 100644 ---- a/src/passes.cc -+++ b/src/passes.cc -@@ -2780,7 +2780,7 @@ i64 set_osec_offsets(Context &ctx) { - if (ctx.phdr) { - i64 sz = ctx.phdr->shdr.sh_size; - ctx.phdr->update_shdr(ctx); -- if (sz != ctx.phdr->shdr.sh_size) -+ if (sz < ctx.phdr->shdr.sh_size) - continue; - } - - -