[PATCH v1 2/2] elf: Add la_objsearch2 with lmid parameter for rtld-audit [BZ #34093]
DJ Delorie
dj@redhat.com
Thu Nov 5 20:01:24 GMT 2026
A few minor tweaks in wording and comments, and I think the test logic
could be simplified for maintainability. The docs for supporting
older linkers needs work.
On Tue, Oct 27, 2026 at 6:45 AM Frédéric Bérat <fberat@redhat.com> wrote:
> diff --git a/NEWS b/NEWS
> index 1d6d0c8e02..7d2d12c537 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -9,6 +9,16 @@ Version 2.45
>
> Major new features:
>
> +* The rtld-audit interface function la_objsearch2 has been added to
> + <link.h>. It provides the target namespace ID (Lmid_t lmid) where the
> + shared object is being loaded, allowing audit modules to monitor and
> + modify library searches per namespace. The LAV_CURRENT macro is now 3 on
> + all architectures; it was already 3 on LoongArch.
> + Existing audit modules returning version 2 remain supported on all
> + architectures except LoongArch (which requires version 3 due to vector
> + register layout additions in glibc 2.39). Audit API version 3 alone does
> + not establish support for la_objsearch2 on older LoongArch dynamic linkers.
Ok.
> diff --git a/bits/link_lavcurrent.h b/bits/link_lavcurrent.h
> index 699b1667f5..a988402735 100644
> --- a/bits/link_lavcurrent.h
> +++ b/bits/link_lavcurrent.h
> @@ -22,4 +22,4 @@
> #endif
>
> /* Version numbers for la_version handshake interface. */
> -#define LAV_CURRENT 2
> +#define LAV_CURRENT 3
Ok.
> @@ -2866,6 +2870,14 @@ $(objpfx)tst-audit28.out: $(objpfx)tst-auditmod28.so
> $(objpfx)tst-auditmod28.so: $(libsupport)
> tst-audit28-ENV = LD_AUDIT=$(objpfx)tst-auditmod28.so
>
> +$(objpfx)tst-audit29.out: $(objpfx)tst-auditmod29.so \
> + $(objpfx)tst-audit18mod.so
> +tst-audit29-ARGS = -- $(host-test-program-cmd)
> +
> +$(objpfx)tst-audit30.out: $(objpfx)tst-auditmod30.so \
> + $(objpfx)tst-audit18mod.so
> +tst-audit30-ARGS = -- $(host-test-program-cmd)
> +
Ok.
> diff --git a/elf/dl-audit.c b/elf/dl-audit.c
> index aadc8ecc79..9ae7cdc4c6 100644
> --- a/elf/dl-audit.c
> +++ b/elf/dl-audit.c
> @@ -51,7 +51,8 @@ _dl_audit_activity_nsid (Lmid_t nsid, int action)
> }
>
> const char *
> -_dl_audit_objsearch (const char *name, struct link_map *l, unsigned int code)
> +_dl_audit_objsearch (const char *name, struct link_map *l, Lmid_t nsid,
> + unsigned int code)
Ok.
> @@ -59,9 +60,15 @@ _dl_audit_objsearch (const char *name, struct link_map *l, unsigned int code)
> struct audit_ifaces *afct = GLRO(dl_audit);
> for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
> {
> - if (afct->objsearch != NULL)
> + struct auditstate *state = link_map_audit_state (l, cnt);
> + if (afct->objsearch2 != NULL)
> + {
> + name = afct->objsearch2 (name, &state->cookie, nsid, code);
> + if (name == NULL)
> + return NULL;
> + }
> + else if (afct->objsearch != NULL)
> {
> - struct auditstate *state = link_map_audit_state (l, cnt);
> name = afct->objsearch (name, &state->cookie, code);
> if (name == NULL)
> return NULL;
Ok. If the auditor defines the new one, it's used even if it returns
failure.
> diff --git a/elf/dl-load.c b/elf/dl-load.c
> static int
> open_verify (const char *name, int fd,
> - struct filebuf *fbp, struct link_map *loader,
> + struct filebuf *fbp, struct link_map *loader, Lmid_t nsid,
> int whatcode, int mode, bool *found_other_class, bool free_name)
Ok.
> if (__glibc_unlikely (GLRO(dl_naudit) > 0))
> {
> const char *original_name = name;
> - name = _dl_audit_objsearch (name, loader, whatcode);
> + /* nsid specifies the destination namespace for the object. */
> + name = _dl_audit_objsearch (name, loader, nsid, whatcode);
> if (name == NULL)
> return -1;
Ok.
> static int
> open_path (const char *name, size_t namelen, int mode,
> struct r_search_path_struct *sps, char **realname,
> - struct filebuf *fbp, struct link_map *loader, int whatcode,
> - bool *found_other_class)
> + struct filebuf *fbp, struct link_map *loader, Lmid_t nsid,
> + int whatcode, bool *found_other_class)
Ok.
>
> - fd = open_verify (buf, -1, fbp, loader, whatcode, mode,
> + fd = open_verify (buf, -1, fbp, loader, nsid, whatcode, mode,
> found_other_class, false);
Ok.
> if (__glibc_unlikely (GLRO(dl_naudit) > 0))
> {
> const char *before = name;
> - name = _dl_audit_objsearch (name, loader, LA_SER_ORIG);
> + /* nsid specifies the destination namespace for the object. */
> + name = _dl_audit_objsearch (name, loader, nsid, LA_SER_ORIG);
Ok.
> fd = open_path (name, namelen, mode,
> &l->l_rpath_dirs,
> - &realname, &fb, loader, LA_SER_RUNPATH,
> + &realname, &fb, loader, nsid, LA_SER_RUNPATH,
> &found_other_class);
Ok.
> fd = open_path (name, namelen, mode,
> &main_map->l_rpath_dirs,
> - &realname, &fb, loader ?: main_map, LA_SER_RUNPATH,
> - &found_other_class);
> + &realname, &fb, loader ?: main_map, nsid,
> + LA_SER_RUNPATH, &found_other_class);
Ok.
> if (cache_rpath (main_map, &l_rpath_dirs,
> DT_RUNPATH, "RUNPATH"))
> fd = open_path (name, namelen, mode, &l_rpath_dirs,
> - &realname, &fb, loader ?: main_map,
> + &realname, &fb, loader ?: main_map, nsid,
> LA_SER_RUNPATH, &found_other_class);
Ok.
> if (fd == -1 && __rtld_env_path_list.dirs != (void *) -1)
> fd = open_path (name, namelen, mode, &__rtld_env_path_list,
> &realname, &fb,
> - loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
> + loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded, nsid,
> LA_SER_LIBPATH, &found_other_class);
Ok.
> fd = open_path (name, namelen, mode,
> - &loader->l_runpath_dirs, &realname, &fb, loader,
> + &loader->l_runpath_dirs, &realname, &fb, loader, nsid,
> LA_SER_RUNPATH, &found_other_class);
Ok.
> fd = open_verify (cached, -1,
> &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded,
> - LA_SER_CONFIG, mode, &found_other_class,
> - false);
> + nsid, LA_SER_CONFIG, mode,
> + &found_other_class, false);
Ok.
> fd = open_path (name, namelen, mode, &__rtld_search_dirs,
> - &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
> + &realname, &fb, l, nsid, LA_SER_DEFAULT,
> + &found_other_class);
Ok.
> fd = open_verify (realname, -1, &fb,
> - loader ?: GL(dl_ns)[nsid]._ns_loaded, 0, mode,
> - &found_other_class, true);
> + loader ?: GL(dl_ns)[nsid]._ns_loaded, nsid, 0,
> + mode, &found_other_class, true);
Ok.
> diff --git a/elf/link.h b/elf/link.h
> extern char *la_objsearch (const char *__name, uintptr_t *__cookie,
> unsigned int __flag);
> +extern char *la_objsearch2 (const char *__name, uintptr_t *__cookie,
> + Lmid_t __lmid, unsigned int __flag);
Ok.
> diff --git a/elf/rtld.c b/elf/rtld.c
> index 9233c50256..ae850faae3 100644
> --- a/elf/rtld.c
> +++ b/elf/rtld.c
> @@ -963,7 +963,7 @@ ERROR: audit interface '%s' requires version %d (maximum supported version %d);
> return;
> }
>
> - enum { naudit_ifaces = 8 };
> + enum { naudit_ifaces = 9 };
> union
> {
> struct audit_ifaces ifaces;
> @@ -983,7 +983,8 @@ ERROR: audit interface '%s' requires version %d (maximum supported version %d);
> #define STRING(s) __STRING (s)
> "la_" STRING (ARCH_LA_PLTENTER) "\0"
> "la_" STRING (ARCH_LA_PLTEXIT) "\0"
> - "la_objclose\0";
> + "la_objclose\0"
> + "la_objsearch2\0";
> unsigned int cnt = 0;
Ok.
> diff --git a/elf/tst-audit29.c b/elf/tst-audit29.c
> new file mode 100644
> index 0000000000..f7a93ad06e
> --- /dev/null
> +++ b/elf/tst-audit29.c
> @@ -0,0 +1,268 @@
> +static int restart;
> +#define CMDLINE_OPTIONS \
> + { "restart", no_argument, &restart, 1 },
Ok.
> +static int
> +handle_restart (void)
> +{
> + /* 1. Base namespace (LM_ID_BASE / 0) check:
> + Load tst-audit18mod.so to trigger genuine library search. */
> + void *h_base = xdlopen ("tst-audit18mod.so", RTLD_NOW);
> +
> + /* Verify xdlinfo positive return with RTLD_DI_PHDR. */
> + const ElfW(Phdr) *phdr = NULL;
> + int phnum = xdlinfo (h_base, RTLD_DI_PHDR, &phdr);
> + TEST_VERIFY (phnum > 0);
> + TEST_VERIFY (phdr != NULL);
> +
> + Lmid_t lmid_base = 0xdeadbeef;
> + xdlinfo (h_base, RTLD_DI_LMID, &lmid_base);
> + TEST_COMPARE (lmid_base, LM_ID_BASE);
> + printf ("SCENARIO: base_lmid=%ld\n", (long int) lmid_base);
> + xdlclose (h_base);
Ok.
> + /* 2. New namespace (LM_ID_NEWLM) check. */
> + void *h_new = xdlmopen (LM_ID_NEWLM, LIBC_SO, RTLD_NOW);
> + Lmid_t lmid_new = 0xdeadbeef;
> + xdlinfo (h_new, RTLD_DI_LMID, &lmid_new);
> + TEST_VERIFY (lmid_new != LM_ID_BASE);
> + printf ("SCENARIO: newlm_lmid=%ld\n", (long int) lmid_new);
Ok.
> + /* 3. Existing namespace check (lmid_new). */
> + void *h_existing = xdlmopen (lmid_new, "tst-audit18mod.so", RTLD_NOW);
> + Lmid_t lmid_existing = 0xdeadbeef;
> + xdlinfo (h_existing, RTLD_DI_LMID, &lmid_existing);
> + TEST_COMPARE (lmid_existing, lmid_new);
> + printf ("SCENARIO: existing_lmid=%ld\n", (long int) lmid_existing);
Ok.
> +static int
> +do_test (int argc, char *argv[])
> +{
> + if (restart)
> + return handle_restart ();
> +
> + /* Provide dynamic headroom for arguments. */
> + char *spargv[argc + 3];
> + int i = 0;
> + for (; i < argc - 1; i++)
> + spargv[i] = argv[i + 1];
I think it's important to mention here why you're skipping argv[0].
> + spargv[i++] = (char *) "--direct";
> + spargv[i++] = (char *) "--restart";
> + spargv[i] = NULL;
> +
> + setenv ("LD_AUDIT", "tst-auditmod29.so", 1);
> + struct support_capture_subprocess result
> + = support_capture_subprogram (spargv[0], spargv, NULL);
> + support_capture_subprocess_check (&result, "tst-audit29", 0,
> + sc_allow_stdout | sc_allow_stderr);
Ok.
> + bool found_objsearch2_base = false;
> + bool found_objsearch2_newlm = false;
> + bool found_objsearch2_existing = false;
> + bool found_legacy_objsearch = false;
> +
> + long int base_lmid = -1;
> + long int newlm_lmid = -1;
> + long int existing_lmid = -1;
> + bool seen_base = false;
> + bool seen_newlm = false;
> + bool seen_existing = false;
> +
> + /* Parse stdout from restart for scenario lmid values. */
> + FILE *out_stdout = xfmemopen (result.out.buffer, result.out.length, "r");
> + char *line = NULL;
> + size_t line_len = 0;
> + while (xgetline (&line, &line_len, out_stdout))
> + {
> + if (strncmp (line, "SCENARIO:", sizeof ("SCENARIO:") - 1) != 0)
> + continue;
A quick comment here letting the reader know that the auditor will be
checked later would be nice, if only because the test is syntactially
complex enough to make that not obvious on the first read-through.
> + const char *value = NULL;
> + long int *lmid = NULL;
> + bool *seen = NULL;
> + if (strncmp (line, "SCENARIO: base_lmid=",
> + sizeof ("SCENARIO: base_lmid=") - 1) == 0)
> + {
> + value = line + sizeof ("SCENARIO: base_lmid=") - 1;
> + lmid = &base_lmid;
> + seen = &seen_base;
> + }
> + else if (strncmp (line, "SCENARIO: newlm_lmid=",
> + sizeof ("SCENARIO: newlm_lmid=") - 1) == 0)
> + {
> + value = line + sizeof ("SCENARIO: newlm_lmid=") - 1;
> + lmid = &newlm_lmid;
> + seen = &seen_newlm;
> + }
> + else if (strncmp (line, "SCENARIO: existing_lmid=",
> + sizeof ("SCENARIO: existing_lmid=") - 1) == 0)
> + {
> + value = line + sizeof ("SCENARIO: existing_lmid=") - 1;
> + lmid = &existing_lmid;
> + seen = &seen_existing;
> + }
> +
> + TEST_VERIFY (value != NULL);
> + if (value == NULL)
> + continue;
Ok; TEST_VERIFY records the error but does not exit.
> + TEST_VERIFY (!*seen);
> + if (*seen)
> + continue;
> + *seen = true;
Ok.
> + const char *digits = *value == '-' ? value + 1 : value;
> + if (*digits < '0' || *digits > '9')
> + {
> + TEST_VERIFY (false);
> + continue;
> + }
> + char *end;
> + errno = 0;
> + long int parsed = strtol (value, &end, 10);
> + if (errno != 0 || (*end != '\0'
> + && (*end != '\n' || end[1] != '\0')))
> + {
> + TEST_VERIFY (false);
> + continue;
> + }
> + *lmid = parsed;
> + }
Ok.
> + free (line);
> + line = NULL;
> + line_len = 0;
> + xfclose (out_stdout);
> +
> + TEST_VERIFY (seen_base);
> + TEST_VERIFY (seen_newlm);
> + TEST_VERIFY (seen_existing);
> + TEST_COMPARE (base_lmid, (long int) LM_ID_BASE);
> + TEST_VERIFY (newlm_lmid > (long int) LM_ID_BASE);
> + TEST_COMPARE (existing_lmid, newlm_lmid);
Ok.
> + /* Parse stderr from restart for la_objsearch2 calls. */
> + FILE *out_stderr = xfmemopen (result.err.buffer, result.err.length, "r");
> + while (xgetline (&line, &line_len, out_stderr))
> + {
> + if (strstr (line, "la_objsearch:") != NULL)
> + found_legacy_objsearch = true;
> +
> + if (strncmp (line, "la_objsearch2:",
> + sizeof ("la_objsearch2:") - 1) == 0)
This pattern happens enough to warrant a macro, for readability?
#define PREFIX(line,str) strncmp (line, str, sizeof(str)-1) == 0
(unless you switch to sscanf of course ;)
> + {
> + bool valid = strncmp (line, "la_objsearch2: name=",
> + sizeof ("la_objsearch2: name=") - 1) == 0;
> + if (!valid)
> + {
> + TEST_VERIFY (valid);
> + continue;
> + }
> + const char *name = line + sizeof ("la_objsearch2: name=") - 1;
> + const char *field = strstr (name, " lmid=");
> + valid = field != NULL && field != name;
> + if (!valid)
> + {
> + TEST_VERIFY (valid);
> + continue;
> + }
I have to wonder if it would have been easier to just use sscanf here.
We're not testing printf, we're expecting exact matches from what we
sent.
> + const char *number = field + sizeof (" lmid=") - 1;
> + const char *digits = *number == '-' ? number + 1 : number;
> + valid = *digits >= '0' && *digits <= '9';
> + if (!valid)
> + {
> + TEST_VERIFY (valid);
> + continue;
> + }
> + char *end;
> + errno = 0;
> + long int lmid = strtol (number, &end, 10);
> + valid = errno == 0 && strncmp (end, " flag=", sizeof (" flag=") - 1) == 0;
> + if (!valid)
> + {
> + TEST_VERIFY (valid);
> + continue;
> + }
> + number = end + sizeof (" flag=") - 1;
> + valid = *number >= '0' && *number <= '9';
> + if (!valid)
> + {
> + TEST_VERIFY (valid);
> + continue;
> + }
> + errno = 0;
> + unsigned long int flag = strtoul (number, &end, 10);
> + valid = errno == 0 && flag <= UINT_MAX
> + && (*end == '\0' || (*end == '\n' && end[1] == '\0'));
> + TEST_VERIFY (valid);
> + if (!valid || flag != LA_SER_ORIG)
> + continue;
Ok.
> + size_t name_len = field - name;
> + bool module_name = name_len == sizeof ("tst-audit18mod.so") - 1
> + && memcmp (name, "tst-audit18mod.so", name_len) == 0;
> + bool libc_name = name_len == sizeof (LIBC_SO) - 1
> + && memcmp (name, LIBC_SO, name_len) == 0;
> + if (module_name && lmid == base_lmid)
> + found_objsearch2_base = true;
> + if (libc_name && lmid == newlm_lmid)
> + found_objsearch2_newlm = true;
> + if (module_name && lmid == existing_lmid)
> + found_objsearch2_existing = true;
> + }
> + }
> + free (line);
> + xfclose (out_stderr);
Ok.
> + /* Verify la_objsearch2 preference over legacy la_objsearch. */
> + TEST_VERIFY (!found_legacy_objsearch);
> +
> + /* Verify each original request used its destination namespace. */
> + TEST_VERIFY (found_objsearch2_base);
> + TEST_VERIFY (found_objsearch2_newlm);
> + TEST_VERIFY (found_objsearch2_existing);
> +
> + support_capture_subprocess_free (&result);
> + return 0;
> +}
Ok.
> diff --git a/elf/tst-audit30.c b/elf/tst-audit30.c
> new file mode 100644
> index 0000000000..1952dda665
> --- /dev/null
> +++ b/elf/tst-audit30.c
> @@ -0,0 +1,111 @@
> +/* Test legacy la_objsearch fallback when la_objsearch2 is not provided.
> + Copyright (C) 2026 Free Software Foundation, Inc.
> . . .
> + support_capture_subprocess_free (&result);
> + return 0;
> +}
Ok.
> diff --git a/elf/tst-auditmod29.c b/elf/tst-auditmod29.c
> new file mode 100644
> index 0000000000..fd83005760
> --- /dev/null
> +++ b/elf/tst-auditmod29.c
> @@ -0,0 +1,49 @@
> +/* Auditor module testing la_objsearch2 with Lmid_t parameter.
> + Copyright (C) 2026 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> . . .
> +unsigned int
> +la_objopen (struct link_map *map, Lmid_t lmid, uintptr_t *cookie)
> +{
> + return LA_FLG_BINDTO | LA_FLG_BINDFROM;
> +}
Do we need la_objopen at all?
> diff --git a/sysdeps/loongarch/bits/link_lavcurrent.h b/elf/tst-auditmod30.c
> similarity index 56%
> rename from sysdeps/loongarch/bits/link_lavcurrent.h
> rename to elf/tst-auditmod30.c
I wish git wouldn't do this ;-)
> index 9718a88a13..15b2e0d0ad 100644
> --- a/sysdeps/loongarch/bits/link_lavcurrent.h
> +++ b/elf/tst-auditmod30.c
> @@ -1,6 +1,5 @@
> -/* Data structure for communication from the run-time dynamic linker for
> - loaded ELF shared objects. LAV_CURRENT definition.
> - Copyright (C) 2023-2026 Free Software Foundation, Inc.
> +/* Auditor module testing legacy la_objsearch fallback.
> + Copyright (C) 2026 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
>
> The GNU C Library is free software; you can redistribute it and/or
> @@ -17,9 +16,25 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> -#ifndef _LINK_H
> -# error "Never include <bits/link_lavcurrent.h> directly; use <link.h> instead."
> -#endif
> +#include <link.h>
> +#include <stdio.h>
>
> -/* Version numbers for la_version handshake interface. */
> -#define LAV_CURRENT 3
> +unsigned int
> +la_version (unsigned int version)
> +{
> + fprintf (stderr, "la_version: %u\n", version);
> + return LAV_CURRENT;
> +}
> +
> +char *
> +la_objsearch (const char *name, uintptr_t *cookie, unsigned int flag)
> +{
> + fprintf (stderr, "la_objsearch: name=%s flag=%u\n", name, flag);
> + return (char *) name;
> +}
> +
> +unsigned int
> +la_objopen (struct link_map *map, Lmid_t lmid, uintptr_t *cookie)
> +{
> + return LA_FLG_BINDTO | LA_FLG_BINDFROM;
> +}
Otherwise ok ;-)
> diff --git a/manual/dynlink.texi b/manual/dynlink.texi
> index f7f35ca9bd..d4a3898fb0 100644
> --- a/manual/dynlink.texi
> +++ b/manual/dynlink.texi
> @@ -968,6 +968,29 @@ Unused.
>
> @end deftypefun
>
> +@deftypefun {char *} la_objsearch2 (const char *@var{name}, uintptr_t *@var{privdata}, Lmid_t @var{lmid}, unsigned int @var{flag})
> +An auditor can provide this callback for the same search events as
> +@code{la_objsearch}. The @var{name}, @var{privdata}, and @var{flag}
> +arguments and the return value have the semantics described for
> +@code{la_objsearch}, including the rules for alternate strings and
> +@code{NULL}. The @var{lmid} argument identifies the destination link
> +namespace for the search, which need not be the namespace of the object
> +doing the search, whose private data @var{privdata} points to.
Ok. I'd say "corresponds to" rather than "points to" as the privdata
is an int by default, and could be bit flags.
> +On a dynamic linker that supports this callback, if an auditor defines
> +both @code{la_objsearch2} and @code{la_objsearch}, only
> +@code{la_objsearch2} is called for that auditor for a given search
> +event. If the auditor does not define @code{la_objsearch2}, the
> +dynamic linker calls its @code{la_objsearch}, if defined.
Ok.
> +Auditors that also support older dynamic linkers should define
> +@code{la_objsearch} as well.
I think this is misleading. An auditor built with LAV_CURRENT will
not load on older ld.so's with the older version. An auditor would
have to return 2 instead of LAV_CURRENT (or 3 on loongarch) and detect
which callback gets called, to support older linkers.
> diff --git a/sysdeps/aarch64/dl-audit-check.h b/sysdeps/aarch64/dl-audit-check.h
> index c49c39b62d..e5b7bf7f96 100644
> --- a/sysdeps/aarch64/dl-audit-check.h
> +++ b/sysdeps/aarch64/dl-audit-check.h
> @@ -24,5 +24,5 @@ _dl_audit_check_version (unsigned int lav)
> missing indirect result save/restore makes _dl_runtime_profile
> potentially trigger undefined behavior if the function returns a large
> struct (even when PLT trace is not requested). */
> - return lav == LAV_CURRENT;
> + return lav >= 2 && lav <= LAV_CURRENT;
Ok.
> diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
> index 305ca6e0df..40374c6724 100644
> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
> @@ -260,6 +260,7 @@ struct audit_ifaces
> #endif
> };
> unsigned int (*objclose) (uintptr_t *);
> + char *(*objsearch2) (const char *, uintptr_t *, Lmid_t, unsigned int);
Ok.
> -/* Call the la_objsearch from the audit modules from the link map L. If
> - ORIGNAME is non NULL, it is updated with the previous name prior calling
> - la_objsearch. */
> +/* Call la_objsearch2 / la_objsearch from the audit modules for the link map L
> + and destination namespace NSID. */
Did we ever figure out why this comment needed changing?
> const char *_dl_audit_objsearch (const char *name, struct link_map *l,
> - unsigned int code)
> + Lmid_t nsid, unsigned int code)
> attribute_hidden;
Ok.
> diff --git a/sysdeps/loongarch/dl-audit-check.h b/sysdeps/loongarch/dl-audit-check.h
> index d92474377d..edeb29e9ed 100644
> --- a/sysdeps/loongarch/dl-audit-check.h
> +++ b/sysdeps/loongarch/dl-audit-check.h
> @@ -19,5 +19,7 @@
> static inline bool
> _dl_audit_check_version (unsigned int lav)
> {
> - return lav == LAV_CURRENT;
> + /* Audit versions prior to 3 do not support LASX/LSX vector registers
> + in La_loongarch_regs and La_loongarch_retval. */
> + return lav >= 3 && lav <= LAV_CURRENT;
Ok.
More information about the Libc-alpha
mailing list