ldbl_hidden_weak??
Zack Weinberg
zackw@panix.com
Wed Dec 27 16:22:00 GMT 2017
On Wed, Dec 27, 2017 at 12:38 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Dez 26 2017, Zack Weinberg <zackw@panix.com> wrote:
>
>> The problem is what to put where it says /* ??? */. It can't be
>> libc_hidden_weak (name), that gives me
>>
>> iovsprintf.c:50:93: error: ‘__EI_vsprintf’ aliased to undefined symbol
>> ‘__GI_vsprintf’
>> ldbl_hidden_weak (__IO_vsprintf, vsprintf)
>
> I think that means you are missing a preceding ldbl_hidden_proto.
There is no such thing as ldbl_hidden_proto. There *is* a
libc_hidden_proto for vsprintf.
$ alpha-linux-gnu-gcc iovsprintf.c ... -save-temps
iovsprintf.c:50:93: error: ‘__EI_vsprintf’ aliased to undefined symbol
‘__GI_vsprintf’
ldbl_hidden_weak (__IO_vsprintf, vsprintf)
$ grep vsprintf iovsprintf.i | grep -v '^#'
extern int vsprintf (char *__restrict __s, const char *__restrict __format,
extern int __vsprintf_chk (char *, int, size_t, const char *,
extern __typeof (vsprintf) vsprintf __asm__ ("" "__GI_vsprintf")
__attribute__ ((visibility ("hidden")));
extern __typeof (__vsprintf_chk) __vsprintf_chk __asm__ (""
"__GI___vsprintf_chk") __attribute__ ((visibility ("hidden")));
extern int _IO_vsprintf (char*, const char*, __gnuc_va_list)
__attribute__ ((__nothrow__ ));
extern __typeof (_IO_vsprintf) _IO_vsprintf __asm__ (""
"__GI__IO_vsprintf") __attribute__ ((visibility ("hidden")));
__IO_vsprintf (char *string, const char *format, __gnuc_va_list args)
extern __typeof (_IO_vsprintf) __EI__IO_vsprintf __asm__(""
"__GI__IO_vsprintf"); extern __typeof (_IO_vsprintf) __EI__IO_vsprintf
__attribute__((alias ("" "__IO_vsprintf")));
extern __typeof (__IO_vsprintf) __GL___IO_vsprintf__IO_vsprintf
__attribute__ ((alias ("__IO_vsprintf"))); __asm__ (".symver "
"__GL___IO_vsprintf__IO_vsprintf" "," "_IO_vsprintf" "@@"
"GLIBC_2.4");
extern __typeof (__IO_vsprintf) __GL___IO_vsprintf_vsprintf
__attribute__ ((weak, alias ("__IO_vsprintf"))); __asm__ (".symver "
"__GL___IO_vsprintf_vsprintf" "," "vsprintf" "@@" "GLIBC_2.4");
extern __typeof (vsprintf) __EI_vsprintf __asm__("" "vsprintf");
extern __typeof (vsprintf) __EI_vsprintf __attribute__((alias (""
"__GI_vsprintf"))) __attribute__((weak));
That is the expansion of
ldbl_hidden_def (__IO_vsprintf, _IO_vsprintf)
ldbl_strong_alias (__IO_vsprintf, _IO_vsprintf)
ldbl_weak_alias (__IO_vsprintf, vsprintf)
ldbl_hidden_weak (__IO_vsprintf, vsprintf)
with ldbl_hidden_weak defined as libc_hidden_weak.
zw
More information about the Libc-alpha
mailing list