Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2020 22:12:09 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Jessica Clarke <jrtc27@freebsd.org>
Cc:        Alexander Richardson <arichardson@freebsd.org>, Justin Hibbits <jhibbits@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r366169 - head/sys/mips/include
Message-ID:  <CANCZdfooSrVZym6=G7UXMo34Hsj9=SNQV_MYZxswQg0%2Bd=gepQ@mail.gmail.com>
In-Reply-To: <F8C2D040-4F4A-4AC6-A593-F47C96846C67@freebsd.org>
References:  <202009251904.08PJ431b029218@repo.freebsd.org> <CA%2BZ_v8r-7mV%2BP=3v_Vp-B_pzs2%2BAG6pSw5MJyK68MBpDuApdKQ@mail.gmail.com> <F8C2D040-4F4A-4AC6-A593-F47C96846C67@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 25, 2020 at 5:05 PM Jessica Clarke <jrtc27@freebsd.org> wrote:

> On 26 Sep 2020, at 00:01, Alexander Richardson <arichardson@freebsd.org>
> wrote:
> >
> >
> > On Fri, 25 Sep 2020, 20:04 Justin Hibbits, <jhibbits@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.
>
> Or why not just #if defined(__mips_o32) || defined(__mips_n32)?


I think we use that in other places for just this issue....

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfooSrVZym6=G7UXMo34Hsj9=SNQV_MYZxswQg0%2Bd=gepQ>