On Monday 19 September 2011 10:43:00 Rob Clark wrote:
> On Mon, Sep 19, 2011 at 10:39 AM, Will Deacon <will.dea...@arm.com> wrote:
> > Arnd,
> >
> > On Mon, Sep 19, 2011 at 08:15:45AM +0100, Arnd Bergmann wrote:
> >> Assuming that we can prevent any funny stuff from going into such an ABI,
> >> we only need to worry about the warts of the current ABI for ARM specific
> >> considerations. The one thing that I've noticed before is that structs
> >> on ARM (at least on one of the ABIs, forgot which) are padded to 32 bits,
> >> even if all members inside are smaller.
> >
> > This is only the case for the old ABI. EABI lays out structures so that they
> > are aligned to their most aligned member and padded to be the smallest
> > possible multiple of that alignment which can contain all of their aligned
> > members.
> 
> Hmm, so then since you can build the kernel w/ OABI compatibility, it
> seems like structs should always have padding fields to force them to
> be a multiple of 32bits...

It depends on whether you want those structures to be compatible with
any other structure. To give a different example, qemu-user supports
converting ioctl data structures to the host data structure for
any commands it knows. When you want to run an arm-oabi binary for
instance on an x86-32 host, you need to conver the data structures
that have this layout, but not when running the same program built
for arm-eabi.

In either case however, you will have to convert the data structures
that contain pointers running qemu-user on x86-64.

        Arnd

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to