HomeFreeBSD

rtld-elf: Fix for mips with LLD 14+

Description

rtld-elf: Fix for mips with LLD 14+

As of LLD 14, it no longer falls back to the address of .text if it
can't find the entry point, and instead just uses address 0. Since the
mips port has always used rtld_start as its entry point symbol but has
never set RTLD_ENTRY to match (instead getting the default .rtld_start),
with LLD 14+ it ends up using an entry point of 0, i.e. reinterpreting
various headers and metadata sections as code, and thus quickly dies, in
my case with SIGILL. This has seemingly always been a warning with LLD
even when it defaulted to .text, but that went unnoticed this whole
time, until now. Fix this by specifying the right symbol name.

This is a direct commit to stable/13 as mips no longer exists in main.

(cherry picked from commit d7bf409a63501a28357a9a9ec24628e1208d530d)

Details

Provenance
jrtc27Authored on Fri, Dec 13, 12:18 AM
Parents
rG50a53aacc9d3: Allow bootstrapping makefs on older FreeBSD hosts and Linux/macOS
Branches
Unknown
Tags
Unknown