Path to this page:
Subject: CVS commit: pkgsrc/devel/mold
From: Frederic Cambus
Date: 2023-01-10 14:55:04
Message id: 20230110135504.2C844FA90@cvs.NetBSD.org
Log Message:
mold: update to 1.9.0.
ChangeLog for mold 1.9.0:
-------------------------
New features:
- mold gained support for the three new targets: 32-bit PowerPC, SH-4 and
DEC Alpha. Each porting work didn't take more than a few days for us to
complete, which demonstrate how portable the mold linker is. You can
typically port mold to a new target just by writing a few hundreds lines
of target-specific code. See arch-*.cc files in mold/elf/ directory to
see how target-specific code actually looks like.
Bug fixes and compatibility improvements:
- In a rare occasion, a statically-initialized function pointer might get
a wrong address in a statically-linked executable. This bug has been
fixed.
- Fixed a -gdb-index option's crash bug on big-endian hosts.
- [RISC-V] mold rewrote machine instructions in a wrong way as a result of
a wrong R_RISCV_HI20 relaxation if the output file was being linked
against the high address. It's not a problem for user-land programs, but
kernels linked with mold could crash due to this bug. This bug has been
fixed.
ChangeLog for mold 1.8.0:
-------------------------
New features:
- The --relocatable (or -r) option has been reimplemented to improve its
performance and compatibility with the GNU linkers. That option tells the
linker to combine input object files into another object file instead of
into an executable or a shared library file. mold has been supporting the
feature since version 0.9, but until now the output file created with -r
looked fairly different from what GNU linkers would produce. GHC (Glasgow
Haskell Compiler) in particular uses re-linkable object files as dynamic
libraries instead of real .so files, and it didn't work with mold. Now,
mold can produce object files that GHC can load. Note that this work was
funded by Mercury, so thanks to the company to help us improve the product.
(Yes, you can ask us to prioritize your feature request by funding the
project.)
- --relocatable-merge-sections option has been added. By default, mold keeps
original input section names for the --relocatable output and therefore
does not merge input sections into a single output sections unless they are
of the same name. If --relocatable-merge-sections is given, mold merges
input by the usual default merging rule. For example, .text.foo and .text.bar
are merged to .text if and only if --relocatable-merge-sections is given
for the --relocatable output.
- -z [no]dynamic-undefined-weak options have been added. This option controls
whether an undefined weak symbol is promoted to a dynamic symbol or not.
- --[no-]undefined-version options have been supported. Now, mold warns on
a symbol name in a version script if it does not match with any defined
symbol. This change was made so that it is easy to find a typo in a version
script.
- mold now warns on symbol type mismatch. If two object files have the same
symbol with different symbol types, it usually means your program has a
bug. Chances are, you are using the same identifier as a function name in
one translation unit and as a global variable name in another. So it makes
sense to warn on the mismatch.
- mold now merges .gnu.note.property sections for various x86 properties.
Removed features:
- The experimental macOS/iOS support has been removed from mold. If you want
to use it, please use our sold linker instead.
Bug fixes and compatibility improvements:
- --wrap now works with LTO.
- A global variable initialized with an IFUNC function pointer is now
initialized correctly with the function's address. Previously, it was
mistakenly initialized to the function resolver's address.
- The filename specified by --version-script or --dynamic-list is now
searched from library search paths if it does not exist in the current
working directory. This behavior is compatible with GNU linkers.
- mold now tries to avoid creating copy relocations as much as possible. This
change fixed a compatibility issue with GHC.
- Thread-local variables are now correctly aligned even if there's a TLV with
a large alignment.
- mold can now handle GCC LTO files created with -ffat-lto-objects.
- mold now accepts -z nopack-relative-relocs as an alias for
--pack-dyn-relocs=none for the sake of compatibility with GNU linkers.
- mold now recognizes -z start-stop-visibility=hidden but ignores it because
it's the default for mold. GNU linkers support this option to control the
visibility of linker-synthesized __start_<sectname> and \
__stop_<sectname>
symbols, with global as the default visibility. mold creates these symbols
with the hidden visibility by default, which is desirable for almost all
cases.
- [ARM32, i386] mold now emits REL-type relocations instead of RELA-type
for the --relocatable output file.
ChangeLog for mold 1.7.1:
-------------------------
Bug fix:
- mold 1.7.0 may generate the same build-id for two different output files.
We fixed the issue in 1.7.1 so that build-id is guaranteed to be unique
for each different output file.
ChangeLog for mold 1.7.0:
-------------------------
New features:
- [m68k] mold now supports the Motorola 68000 series microprocessors. Yes,
it's the processor in the original Mac or Sun workstations in the 80s.
This work is sponsored by m68k hobbyist communities.
Bug fixes and compatibility improvements:
- We fixed a few issues for Facebook/Meta's BOLT optimizer. Starting from
the next LLVM release (we need llvm/llvm-project@20204db), BOLT should
work on mold-generated executables out of the box.
- We fixed a long-standing symbol resolution issue involving GNU UNIQUE
symbols which caused a link failure for a few programs.
- Previously, if a version script contains a "C++" directive, and a symbol
matches a non-C++ version pattern and a C++ version pattern, a wrong
version could be assigned to the symbol. This has been fixed so that the
mold's behavior matches with GNU ld.
Files: