svn commit: r366169 - head/sys/mips/include

Alexander Richardson arichardson at freebsd.org
Fri Sep 25 23:02:02 UTC 2020


On Fri, 25 Sep 2020, 20:04 Justin Hibbits, <jhibbits at freebsd.org> wrote:

> Author: jhibbits
> Date: Fri Sep 25 19:04:03 2020
> New Revision: 366169
> URL: https://svnweb.freebsd.org/changeset/base/366169
>
> Log:
>   mips: Fix compat32 library builds from r366162
>
>   Re-add the a_ptr and a_fcn fields to Elf32_Auxinfo.
>
>   MFC after:    1 week
>   Sponsored by: Juniper Networks, Inc.
>
> Modified:
>   head/sys/mips/include/elf.h
>
> Modified: head/sys/mips/include/elf.h
>
> ==============================================================================
> --- head/sys/mips/include/elf.h Fri Sep 25 19:02:49 2020        (r366168)
> +++ head/sys/mips/include/elf.h Fri Sep 25 19:04:03 2020        (r366169)
> @@ -105,6 +105,10 @@ typedef struct {   /* Auxiliary vector entry on
> initial
>         int     a_type;                 /* Entry type. */
>         union {
>                 int     a_val;          /* Integer value. */
> +#ifndef __mips_n64
> +               void    *a_ptr;         /* Address. */
> +               void    (*a_fcn)(void); /* Function pointer (not used). */
> +#endif
>         } a_un;
>  } Elf32_Auxinfo;


Not sure what the current minimal compiler versions are, but maybe this
should be #if __SIZEOF_POINTER__ == 4 instead of checking the ABI? This
would break CHERI-MIPS kernels since we don't define __mips_n64 for the
pure-capability ABI (128-bit pointers). However, we don't really do compat
32 right now so it probably doesn't matter much.

Alex


More information about the svn-src-head mailing list