* ldbl_hidden_weak??
@ 2017-12-26 22:44 Zack Weinberg
2017-12-27 8:38 ` ldbl_hidden_weak?? Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2017-12-26 22:44 UTC (permalink / raw)
To: GNU C Library
For the not-installing-libio patches I have determined that I need to
add a macro ldbl_hidden_weak, but I can't figure out how to do that.
This is as far as I've gotten:
diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c
index 63290fb365..871d8db072 100644
--- a/libio/iovsprintf.c
+++ b/libio/iovsprintf.c
@@ -47,4 +47,4 @@ ldbl_hidden_def (__IO_vsprintf, _IO_vsprintf)
ldbl_strong_alias (__IO_vsprintf, _IO_vsprintf)
ldbl_weak_alias (__IO_vsprintf, vsprintf)
-libc_hidden_weak (vsprintf)
+ldbl_hidden_weak (__IO_vsprintf, vsprintf)
diff --git a/sysdeps/generic/math_ldbl_opt.h b/sysdeps/generic/math_ldbl_opt.h
index 8a5d8ba107..a4b3806a10 100644
--- a/sysdeps/generic/math_ldbl_opt.h
+++ b/sysdeps/generic/math_ldbl_opt.h
@@ -9,6 +9,7 @@
#define LONG_DOUBLE_COMPAT(lib, introduced) 0
#define long_double_symbol(lib, local, symbol)
#define ldbl_hidden_def(local, name) libc_hidden_def (name)
+#define ldbl_hidden_weak(local, name) libc_hidden_weak (name)
#define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
#define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
#define __ldbl_is_dbl 0
diff --git a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
index af861c11ea..88bf5e49a9 100644
--- a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
+++ b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
@@ -12,6 +12,7 @@
long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
#ifdef SHARED
# define ldbl_hidden_def(local, name) libc_hidden_ver (local, name)
+# define ldbl_hidden_weak(local, name) /* ??? */
# define ldbl_strong_alias(name, aliasname) \
strong_alias (name, __GL_##name##_##aliasname) \
long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
@@ -22,6 +23,7 @@
versioned_symbol (lib, local, symbol, version)
#else
# define ldbl_hidden_def(local, name) libc_hidden_def (name)
+# define ldbl_hidden_weak(local, name) libc_hidden_weak (name)
# define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
# define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
# ifndef __ASSEMBLER__
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)
but the logic in both math_ldbl_opt.h and libc-symbols.h is so
convoluted and undocumented that I can't figure out what it _should_
be.
zw
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ldbl_hidden_weak??
2017-12-26 22:44 ldbl_hidden_weak?? Zack Weinberg
@ 2017-12-27 8:38 ` Andreas Schwab
2017-12-27 16:22 ` ldbl_hidden_weak?? Zack Weinberg
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2017-12-27 8:38 UTC (permalink / raw)
To: Zack Weinberg; +Cc: GNU C Library
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.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ldbl_hidden_weak??
2017-12-27 8:38 ` ldbl_hidden_weak?? Andreas Schwab
@ 2017-12-27 16:22 ` Zack Weinberg
2017-12-27 21:46 ` ldbl_hidden_weak?? Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2017-12-27 16:22 UTC (permalink / raw)
To: Andreas Schwab; +Cc: GNU C Library
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ldbl_hidden_weak??
2017-12-27 16:22 ` ldbl_hidden_weak?? Zack Weinberg
@ 2017-12-27 21:46 ` Andreas Schwab
2017-12-27 22:12 ` ldbl_hidden_weak?? Zack Weinberg
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2017-12-27 21:46 UTC (permalink / raw)
To: Zack Weinberg; +Cc: GNU C Library
On Dez 27 2017, Zack Weinberg <zackw@panix.com> wrote:
> 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.
Then you need to implement it.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ldbl_hidden_weak??
2017-12-27 21:46 ` ldbl_hidden_weak?? Andreas Schwab
@ 2017-12-27 22:12 ` Zack Weinberg
0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2017-12-27 22:12 UTC (permalink / raw)
To: Andreas Schwab; +Cc: GNU C Library
On Wed, Dec 27, 2017 at 1:46 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Dez 27 2017, Zack Weinberg <zackw@panix.com> wrote:
>
>> 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.
>
> Then you need to implement it.
In fact, no, the key piece that turns out to be missing is libc_hidden_weak_ver.
zw
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-27 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-26 22:44 ldbl_hidden_weak?? Zack Weinberg
2017-12-27 8:38 ` ldbl_hidden_weak?? Andreas Schwab
2017-12-27 16:22 ` ldbl_hidden_weak?? Zack Weinberg
2017-12-27 21:46 ` ldbl_hidden_weak?? Andreas Schwab
2017-12-27 22:12 ` ldbl_hidden_weak?? Zack Weinberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).