This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: BZ #14557: __kernel_vsyscall unwind info is incorrect
> The _ns_loaded list is for ld.so and doesn't support libc.a. For
> example, ld.so calls its own malloc routines to manage memory before
> entering main. We can't easily do that in libc.a since we need to set up
> a few things for malloc first. Unless there is a specific issue we need
> to address, I'd like to use the existing patch. OK to install?
If statically-linked programs are going to know about the vDSO at all,
then they should support it fully. That means a static program can use
-ldl and use dlsym to access the vDSO, for example.
The rtld.c code that sets up dl_sysinfo_map can move into a new internal
function in a new dl-foo.c file built both for ld.so and for libc.a. For
static, that function can be called by some __attribute__((constructor))
function that is defined in the same file as the definition of some data
variables that only -ldl code or dl_iterate_phdr will use, so it's not
included in a static link that doesn't need it. Surely a static program's
__attribute__((constructor)) functions can call malloc (if they can't, then
that's a preexisting bug we should fix first).
Thanks,
Roland