This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] posix: Add internal symbols for posix_spawn interface
On 17/09/2018 05:12, Florian Weimer wrote:
> On 09/15/2018 05:16 PM, Adhemerval Zanella wrote:
>> +__typeof (posix_spawn) __posix_spawn;
>> +libc_hidden_proto (__posix_spawn)
>
> I think libc_hidden_proto without a GLIBC_PRIVATE export doesn't make much sense. Why can't you use attribute_hidden here, like for the other new function symbols?
>
> Thanks,
> Florian
I had to use libc_hidden_proto because versioned_symbol with a hidden
symbol produces only a local one:
$ cat foo.c
void __foo () __attribute__ ((visibility ("hidden")));
void __foo ()
{
}
__asm__ (".symver __foo, foo@@LIBFOO_1.0");
$ cat libfoo.map
LIBFOO_1.0 {
global:
foo;
};
$ gcc -Wall -fpic -shared foo.c -o libfoo.so -Wl,-version-script=libfoo.map
$ objdump -t libfoo.so | grep -w foo
0000000000000000 l df *ABS* 0000000000000000 foo.c
00000000000005da l F .text 0000000000000007 foo@@LIBFOO_1.0