Re: [PATCH] arm: vdso: pass --be8 to linker if necessary
From: Russell King - ARM Linux admin
Date: Fri May 31 2019 - 04:41:15 EST
On Fri, May 31, 2019 at 11:01:23AM +0900, Masahiro Yamada wrote:
> Hi Jason,
>
> Thanks for catching this.
>
> On Thu, May 30, 2019 at 3:26 AM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> >
> > The commit fe00e50b2db8 ("ARM: 8858/1: vdso: use $(LD) instead of $(CC)
> > to link VDSO") removed the passing of CFLAGS, since ld doesn't take
> > those directly. However, prior, big-endian ARM was relying on gcc to
> > translate its -mbe8 option into ld's --be8 option. Lacking this, ld
>
>
> 'git grep -- -mbe8' has no hit.
It isn't -mbe8, it is --be8
$ arm-linux-gcc --target-help
...
--be8 Output BE8 format image
>
> Is it a toolchain internal flag?
>
>
>
> > generated be32 code, making the VDSO generate SIGILL when called by
> > userspace.
> >
> > This commit passes --be8 if CONFIG_CPU_ENDIAN_BE8 is enabled.
> >
> > Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
> > Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> > Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
> > Cc: Arnd Bergmann <arnd@xxxxxxxx>
> > Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> > ---
> > arch/arm/vdso/Makefile | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
> > index fadf554d9391..1f5ec9741e6d 100644
> > --- a/arch/arm/vdso/Makefile
> > +++ b/arch/arm/vdso/Makefile
> > @@ -10,9 +10,10 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
> > ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
> > ccflags-y += -DDISABLE_BRANCH_PROFILING
> >
> > -ldflags-y = -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
> > +ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
> > +ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
> > -z max-page-size=4096 -z common-page-size=4096 \
> > - -nostdlib -shared \
> > + -nostdlib -shared $(ldflags-y) \
> > $(call ld-option, --hash-style=sysv) \
> > $(call ld-option, --build-id) \
> > -T
> > --
> > 2.21.0
> >
>
>
> --
> Best Regards
> Masahiro Yamada
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up