git: 2c3ad0c04612 - stable/15 - rtld: Remove a stale #ifdef PIC

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 08 Oct 2026 20:44:04 UTC
The branch stable/15 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=2c3ad0c04612fadfe144069d4197541278acb440

commit 2c3ad0c04612fadfe144069d4197541278acb440
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-08-13 17:02:17 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-10-08 20:42:32 +0000

    rtld: Remove a stale #ifdef PIC
    
    rtld has always been built PIC since commit
    7ca8e6a67068e8357e251bd3ea86253c8a751d59.  The stale #ifdef might
    confuse a reader by thinking rtld can be built as non-PIC.
    
    Reviewed by:    kib
    Sponsored by:   AFRL, DARPA
    Differential Revision:  https://reviews.freebsd.org/D58623
    
    (cherry picked from commit ec8985a1003326eff53cb6b594000b7cbb2114c5)
---
 libexec/rtld-elf/rtld.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 00cbba276ef3..10fdbfa597cb 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -2513,9 +2513,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info)
 	objtmp.path = NULL;
 	objtmp.rtld = true;
 	objtmp.mapbase = mapbase;
-#ifdef PIC
 	objtmp.relocbase = mapbase;
-#endif
 
 	objtmp.dynamic = rtld_dynamic(&objtmp);
 	digest_dynamic1(&objtmp, 1, &dyn_rpath, &dyn_soname, &dyn_runpath);