git: b1b517412342 - main - rtld: Add ${TOKEN} aliases to $TOKEN
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Feb 2022 18:01:57 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b1b517412342f336a8e6d153130b2f4110e0285b commit b1b517412342f336a8e6d153130b2f4110e0285b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-02-11 13:46:05 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-02-11 18:01:20 +0000 rtld: Add ${TOKEN} aliases to $TOKEN it seems that glibc supports them, and such spelling is mentioned in the ld.bfd manual. Idea seems to auto-correct some quoting/makefile sytnax errors on linker command line. Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34247 --- libexec/rtld-elf/rtld.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 63b921ff2503..9ab84b3e3fa3 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1181,9 +1181,13 @@ static const struct { const char *subst; } tokens[] = { { .kw = "$ORIGIN", .pass_obj = true, .subst = NULL }, + { .kw = "${ORIGIN}", .pass_obj = true, .subst = NULL }, { .kw = "$OSNAME", .pass_obj = false, .subst = uts.sysname }, + { .kw = "${OSNAME}", .pass_obj = false, .subst = uts.sysname }, { .kw = "$OSREL", .pass_obj = false, .subst = uts.release }, + { .kw = "${OSREL}", .pass_obj = false, .subst = uts.release }, { .kw = "$PLATFORM", .pass_obj = false, .subst = uts.machine }, + { .kw = "${PLATFORM}", .pass_obj = false, .subst = uts.machine }, }; static char *