PATCH: Add x32 support to sysdeps/x86_64/dl-tlsdesc.h

H.J. Lu hjl.tools@gmail.com
Thu Mar 22 15:46:00 GMT 2012


On Wed, Mar 21, 2012 at 2:58 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>    ptrdiff_t (*entry)(struct tlsdesc *on_rax);
>> +#ifndef __LP64__
>> +  int pad1;
>> +#endif
>>    void *arg;
>> +#ifndef __LP64__
>> +  int pad2;
>> +#endif
>
> I wonder if it might not be cleaner to use:
>
>    union
>    {
>      ptrdiff_t (*entry) (struct tlsdesc *on_rax);
>      uint64_t entry_slot;
>    };
>    union
>    {
>      void *arg;
>      uint64_t arg_slot;
>    };
>

This works.  Here is the updated patch.  Tested on
Linux/x86-64 and Linux/x32.  OK to install?

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libc-dl-tlsdesc.patch
Type: text/x-patch
Size: 931 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120322/41d50656/attachment.bin>


More information about the Libc-alpha mailing list