pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/mold



Module Name:    pkgsrc
Committed By:   fcambus
Date:           Sun Nov  5 16:59:36 UTC 2023

Modified Files:
        pkgsrc/devel/mold: Makefile distinfo
        pkgsrc/devel/mold/patches: patch-CMakeLists.txt

Log Message:
mold: update to 2.3.2.

mold 2.3.0 ChangeLog:

New features:

- [x86-64] mold 2.3.0 has introduced an experimental flag, -z rewrite-endbr,
  which rewrites superfluous endbr64 instructions as nop.

  endbr64 is a relatively recent x86 instruction used to mark locations
  where an indirect jump instruction can transfer control. With control-flow
  integrity enabled (meaning endbr64 is effective), an indirect jump can
  only target an endbr64 or it will trigger a runtime exception. This
  mechanism significantly hinders certain control hijacking attacks, such
  as ROP or JOP, since attackers cannot jump to just any location.

  When given the -fcf-protection flag, GCC conservatively places an endbr64
  at the beginning of every global function. This is because the function's
  address might be taken as a pointer by other translation units. However,
  in most cases, function addresses are not actually taken. This conservative
  approach results in an overabundance of unnecessary endbr64 instructions,
  leading to not only code bloating but also a potential decrease in security
  as there are more locations for an attacker to exploit.

  The new linker option, -z rewrite-endbr, aims to alleviate this issue.
  The linker can carry out a whole-program analysis on the input files to
  identify functions whose addresses are never taken. If -z rewrite-endbr
  is specified, mold will conduct this analysis and replace the initial
  endbr64 with a nop for functions whose addresses aren't taken.

  mold also emits an endbr64 in a PLT entry only when the address of the
  PLT entry is taken.

Bug fixes and compatibility improvements:

- mold now produces a more compact .gdb_index section when using the
  --gdb-index flag. Additionally, mold now generates a correct .gdb_index
  section for object files created by Clang.
- mold is now capable of handling input sections larger than 4 GiB.
- [PPC] mold can now generate executables for POWER10 processors. Previously,
  executables produced by mold would crash immediately on startup on POWER10.
- [ARM64] When a function with a non-standard calling convention is exported,
  it's mandatory for the linker to turn on the STO_AARCH64_VARIANT_PCS flag
  to notify the dynamic linker. mold now appropriately sets this flag.
- [RISC-V] mold now supports new GP-relative relocations.

mold 2.3.1 contains the following bug fixes:

- [ARM32, ARM64, PowerPC, LoongArch] mold 2.3.0 would crash when handling
  large output files. This was due to a bug in the code that creates range
  extension thunks. This issue has now been resolved.
- [LoongArch] mold is now capable of handling relocations generated for
  the -mcmodel=extreme flag.

mold 2.3.2 contains the following bug fixes:

- mold no longer emits dynamic relocations against the text segment for
  GNU ifunc symbols. Previously, mold emitted such relocations for
  position-dependent executables. (4cdfc7e)
- mold no longer reports the "REL-type relocation table is not supported
  for this target" error and instead ignore incompatible relocation tables.
  LLVM generates such non-conforming relocation tables for the
  .llvm.call-graph-profile section. This change was made for compatibility.
- mold now pads unused gaps in the text segment with interrupt or NOP
  instructions, instead of leaving them filled with zeros. This alteration
  does not change the program's semantics but prevents disassemblers from
  interpreting the spaces between functions as valid instructions.
- mold now creates the .mold-lock file for MOLD_JOBS not in the home
  directory but in $XDG_RUNTIME_DIR, which is usually /var/user/<uid>.
- [ARM32] There was an issue preventing mold from being built on an ARMv8
  64-bit ARM processor with an ARM32 userland, such as the 32-bit Raspberry
  Pi OS running on a Raspberry Pi 4. This build issue has been resolved.
- [LoongArch] mold can now handle R_LARCH_PCALA_LO12 relocation for the
  jirl instruction.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 pkgsrc/devel/mold/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/devel/mold/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/mold/patches/patch-CMakeLists.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/mold/Makefile
diff -u pkgsrc/devel/mold/Makefile:1.36 pkgsrc/devel/mold/Makefile:1.37
--- pkgsrc/devel/mold/Makefile:1.36     Thu Sep 28 14:47:59 2023
+++ pkgsrc/devel/mold/Makefile  Sun Nov  5 16:59:35 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.36 2023/09/28 14:47:59 fcambus Exp $
+# $NetBSD: Makefile,v 1.37 2023/11/05 16:59:35 fcambus Exp $
 
-DISTNAME=      mold-2.2.0
+DISTNAME=      mold-2.3.2
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=rui314/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}

Index: pkgsrc/devel/mold/distinfo
diff -u pkgsrc/devel/mold/distinfo:1.30 pkgsrc/devel/mold/distinfo:1.31
--- pkgsrc/devel/mold/distinfo:1.30     Thu Sep 28 14:47:59 2023
+++ pkgsrc/devel/mold/distinfo  Sun Nov  5 16:59:35 2023
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.30 2023/09/28 14:47:59 fcambus Exp $
+$NetBSD: distinfo,v 1.31 2023/11/05 16:59:35 fcambus Exp $
 
-BLAKE2s (mold-2.2.0.tar.gz) = a879b13d19fe67046fcfa5bec585b0fb4bd27e81b868a0b056fa1baf1bb87b2b
-SHA512 (mold-2.2.0.tar.gz) = 1692d1ff154335fdff91a4fafebb3514ed6742035c14e74ec7e552b90428a1cd5341baba9183158b44ae221fd19e86da55e7f04bde317b943a24d0afecb41002
-Size (mold-2.2.0.tar.gz) = 9956678 bytes
-SHA1 (patch-CMakeLists.txt) = 2737ab2e9a3d3e82a8c825878ec6873bb825f0b2
+BLAKE2s (mold-2.3.2.tar.gz) = c745f95dc8d2faa026aae823b7004389aeb19657acdcc6cf1eb219d142346428
+SHA512 (mold-2.3.2.tar.gz) = dd98acb351757f99399b7d52589c339648478624323fd45c9e986eaf7f1a60f52ace4c09a2d20246e9340109641bda676735da9de89a277989851bd5f52ea9d0
+Size (mold-2.3.2.tar.gz) = 9970530 bytes
+SHA1 (patch-CMakeLists.txt) = 8b4974a524a33a683ff3bfcb4bddc965b1111d8e

Index: pkgsrc/devel/mold/patches/patch-CMakeLists.txt
diff -u pkgsrc/devel/mold/patches/patch-CMakeLists.txt:1.4 pkgsrc/devel/mold/patches/patch-CMakeLists.txt:1.5
--- pkgsrc/devel/mold/patches/patch-CMakeLists.txt:1.4  Thu Sep 28 14:47:59 2023
+++ pkgsrc/devel/mold/patches/patch-CMakeLists.txt      Sun Nov  5 16:59:36 2023
@@ -1,12 +1,12 @@
-$NetBSD: patch-CMakeLists.txt,v 1.4 2023/09/28 14:47:59 fcambus Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.5 2023/11/05 16:59:36 fcambus Exp $
 
 Disable precompiled headers.
 
 cc1plus: warning: cmake_pch.hxx.gch: had text segment at different address
 
---- CMakeLists.txt.orig        2023-09-24 03:28:19.000000000 +0000
+--- CMakeLists.txt.orig        2023-11-04 06:44:32.000000000 +0000
 +++ CMakeLists.txt
-@@ -402,9 +402,6 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUA
+@@ -403,9 +403,6 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUA
      target_precompile_headers(mold PRIVATE
        "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/elf/mold.h>"
        "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/macho/mold.h>")



Home | Main Index | Thread Index | Old Index