HomeFreeBSD

MFC r309411: Retire long-broken/unused static rtld support

Description

MFC r309411: Retire long-broken/unused static rtld support

rtld-elf has some vestigial support for building as a static executable.
r45501 introduced a partial implementation with a prescient note that it
"might never be enabled." r153515 introduced ELF symbol versioning
support, and removed part of the unused build infrastructure for static
rtld.

GNU ld populates rela relocation addends and GOT entries with the same
values, and rtld's run-time dynamic executable check relied on this.
Alternate toolchains may not populate the GOT entries, which caused
RTLD_IS_DYNAMIC to return false. Simplify rtld by just removing the
unused check.

If we want to restore static rtld support later on we ought to introduce
a build-time #ifdef flag.

PR: 214972

Details

Provenance
emasteAuthored on
Parents
rS311155: MFC r310634: elfcopy: fix PE object section name corruption and crash
Branches
Unknown
Tags
Unknown