This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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/RFC] auxv entries


> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Date: Sun, 14 Sep 2008 21:33:04 -0300
> 
> (I'd really, really like to talk to the person who thought it would be a
> good idea to make <ctrl>+<enter> a shortcut to send the message.)

Heh

> El dom, 14-09-2008 a las 23:27 +0200, Mark Kettenis escribió:
> > Many, if not all, processor-specific ELF ABI documents have the
> > following definition of auxv entries:
> > 
> > typedef struct
> > {
> >        int   a_type;
> >        union {
> >               long a_val;
> >               void *a_ptr;
> >               void (*a_fcn)();
> >        } a_un;
> > } auxv_t;
> 
> I have this in <elf.h> in ppc64-linux:
> 
> typedef struct
> {
>   uint64_t a_type;              /* Entry type */
>   union
>     {
>       uint64_t a_val;           /* Integer value */
>       /* We use to have pointer elements added here.  We cannot do that,
>          though, since it does not work when using 32-bit definitions
>          on 64-bit platforms and vice versa.  */
>     } a_un;
> } Elf64_auxv_t;
> 
> So default_auxv_parse seems right to me.

Hmm, so it looks like Linux doesn't follow the 64-bit PowerPC ABI
here.  At least version 1.7 of that spec has the "standard" form of
the struct with a_type being an int.

OpenBSD and Solaris both use the "standard" form, so I'd argue that
Linux is the odd one out here.  I'll see if I can come up with a diff
that overrides the standard layout for 64-bit PPC linux.


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