Re: [PATCH 1/4] s390/vdso64: filter out munaligned-symbols flag for vdso

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 13, 2024 at 11:47:04AM +0100, Sumanth Korikkar wrote:
> Gcc recently implemented an optimization [1] for loading symbols without
> explicit alignment, aligning with the IBM Z ELF ABI. This ABI mandates
> symbols to reside on a 2-byte boundary, enabling the use of the larl
> instruction. However, kernel linker scripts may still generate unaligned
> symbols. To address this, a new -munaligned-symbols option has been
> introduced [2] in recent gcc versions.
> 
> [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622872.html
> [2] https://gcc.gnu.org/pipermail/gcc-patches/2023-August/625986.html
> 
> However, when -munaligned-symbols  is used in vdso code, it leads to the
> following compilation error:
> `.data.rel.ro.local' referenced in section `.text' of
> arch/s390/kernel/vdso64/vdso64_generic.o: defined in discarded section
> `.data.rel.ro.local' of arch/s390/kernel/vdso64/vdso64_generic.o
> 
> vdso linker script discards .data section to make it lightweight.
> However, -munaligned-symbols in vdso object files references literal
> pool and accesses _vdso_data. Hence, compile vdso code without
> -munaligned-symbols.  This means in the future, vdso code should deal
> with alignment of newly introduced unaligned linker symbols.
> 
> Signed-off-by: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx>
> ---
>  arch/s390/kernel/vdso64/Makefile | 1 +
>  1 file changed, 1 insertion(+)

Acked-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux