git: d7bf409a6350 - stable/13 - rtld-elf: Fix for mips with LLD 14+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Dec 2024 00:18:57 UTC
The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d7bf409a63501a28357a9a9ec24628e1208d530d commit d7bf409a63501a28357a9a9ec24628e1208d530d Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2024-12-13 00:18:33 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2024-12-13 00:18:33 +0000 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. --- libexec/rtld-elf/mips/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rtld-elf/mips/Makefile.inc b/libexec/rtld-elf/mips/Makefile.inc index dc41c0cfab27..f2d2ae6d8c36 100644 --- a/libexec/rtld-elf/mips/Makefile.inc +++ b/libexec/rtld-elf/mips/Makefile.inc @@ -1,2 +1,3 @@ +RTLD_ENTRY= rtld_start CFLAGS.reloc.c+=-fno-jump-tables