[PATCH] Add hidden visibility to internal function prototypes

Florian Weimer fweimer@redhat.com
Tue Aug 22 10:47:00 GMT 2017


On 08/21/2017 11:15 PM, Joseph Myers wrote:
> On Mon, 21 Aug 2017, Florian Weimer wrote:
> 
>>> The test links with libc.so, but it uses various GMP objects from libc.a.
>>>
>>> Generically, any test using any objects from libc.a will have problems if 
>>> those reference hidden symbols (in this case, __assert_fail) from 
>>> elsewhere in libc.
>>
>> I don't think linking a test both against libc.a and libc.so is valid.
>>
>> In other cases, in order to test hidden symbols, we use fully static
>> linking instead.  Is this something we could do here as well?  I don't
>> think it would invalidate the tests any more than the current hybrid
>> linkage model does.
> 
> As far as I know, linking those tests statically would be OK (it would not 
> significantly affect what they are testing).  That's atext-exp, 
> atest-sincos, atest-exp2 that are using internal GMP objects from libc.a; 
> I don't know if other tests, in math/ or elsewhere, also link against 
> particular libc.a objects.

I think the attached approach will work for the math subdirectory.
Tested on aarch64 and ppc64le.

I see additional aarch64 failures, though (outside math).

Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: math-static-tests.patch
Type: text/x-patch
Size: 1823 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170822/a733c48b/attachment.bin>


More information about the Libc-alpha mailing list