[PATCH 3/3] x86-64: Mark internal symbols with attribute_hidden [BZ #18822]

H.J. Lu hjl.tools@gmail.com
Mon Aug 21 12:57:00 GMT 2017


On Mon, Aug 21, 2017 at 5:38 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 08/18/2017 06:28 PM, H.J. Lu wrote:
>
>> -extern long int __syscall_clock_gettime (clockid_t, struct timespec *);
>> +extern long int __syscall_clock_gettime (clockid_t, struct timespec *)
>> +  attribute_hidden;
>
> Should this be
>
>   __typeof__ (clock_gettime) __syscall_clock_gettime attribute_hidden;
>
> for added type safety?
>
>>  static inline void
>> diff --git a/sysdeps/unix/sysv/linux/x86_64/makecontext.c b/sysdeps/unix/sysv/linux/x86_64/makecontext.c
>> index 59fb77a8c1..e198a2215a 100644
>> --- a/sysdeps/unix/sysv/linux/x86_64/makecontext.c
>> +++ b/sysdeps/unix/sysv/linux/x86_64/makecontext.c
>> @@ -51,7 +51,7 @@
>>  void
>>  __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
>>  {
>> -  extern void __start_context (void);
>> +  extern void __start_context (void) attribute_hidden;
>
> This is okay.  The definition is in assembler code, so a separate header
> would not add type safety.
>

This is what I am checking in.

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-64-Mark-internal-symbols-with-attribute_hidden-B.patch
Type: text/x-patch
Size: 1795 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170821/06dfa79a/attachment.bin>


More information about the Libc-alpha mailing list