This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Fri, Mar 23, 2012 at 10:09 AM, Roland McGrath <roland@hack.frob.com> wrote:
> Didn't I mention before? ?Maybe I forgot to. ?There should be a comment
> saying why we are using the unions. ?But with an explanatory comment added,
> that looks fine to me.
>
> Thanks,
> Roland
>

Does this comment look OK?

/* Type used to represent a TLS descriptor in the GOT.  */
struct tlsdesc
{
  /* Anonymous union is used here to ensure that GOT entry slot is always
     8 bytes for both x32 and x86-64.  */
  union
    {
      ptrdiff_t (*entry) (struct tlsdesc *on_rax);
      uint64_t entry_slot;
    };
  union
    {
      void *arg;
      uint64_t arg_slot;
    };
};

Thanks.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]