[PATCH v4] Check global symbols in static library against shared library

Florian Weimer fweimer@redhat.com
Thu May 23 15:54:52 GMT 2024


* H. J. Lu:

> On Thu, May 23, 2024 at 6:51 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * H. J. Lu:
>>
>> > diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
>> > index 11d5e65503..ed658c143e 100644
>> > --- a/sysdeps/alpha/Makefile
>> > +++ b/sysdeps/alpha/Makefile
>> > @@ -33,6 +33,11 @@ sysdep_routines += stxcpy stxncpy
>> >  endif
>> >
>> >  ifeq ($(subdir),elf)
>> > +# These global symbols are only in libc.so.
>> > +libc-shared-only-symbols += \
>> > +  __nldbl__IO_vfscanf \
>> > +# libc-shared-only-symbols
>> > +
>> >  # The ld.so startup code cannot use literals until it self-relocates.
>> >  CFLAGS-rtld.c = -mbuild-constants
>> >  endif
>>
>> Why doesn't this indicate a bug?  Shouldn't this part of libc.a, too?
>
> It is referenced from libnldbl_nonshared.a.
>
>> If it's not a bug, I think this belongs into
>> sysdeps/ieee754/ldbl-opt/Makefile.
>
> I will fix it.

What I meant is that you should probably be able to call scanf
from a program that is linked with -static -lnldbl, and the bug is the
missing __nldbl__IO_vfscanf function in libc.a.

Thanks,
Florian



More information about the Libc-alpha mailing list