[PATCH v2 04/12] linker_lists: Rename sections to remove . prefix

Andrew Scull ascull at google.com
Wed May 18 09:02:27 CEST 2022


On Tue, 17 May 2022 at 09:06, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 4/14/22 15:59, Andrew Scull wrote:
> > Rename the sections used to implement linker lists so they begin with
> > '__u_boot_list' rather than '.u_boot_list'. The double underscore at the
> > start is still distinct from the single underscore used by the symbol
> > names.
> >
> > Having a '.' in the section names conflicts with clang's ASAN
> > instrumentation which tries to add redzones between the linker list
> > elements, causing expected accesses to fail. However, clang doesn't try
> > to add redzones to user sections, which are names with all alphanumeric
> > and underscore characters.
> >
> > Signed-off-by: Andrew Scull <ascull at google.com>
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> > ---
> >   arch/arc/cpu/u-boot.lds                       |  4 ++--
> >   arch/arm/config.mk                            |  4 ++--
> >   arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds   |  4 ++--
> >   arch/arm/cpu/armv7/sunxi/u-boot-spl.lds       |  4 ++--
> >   arch/arm/cpu/armv8/u-boot-spl.lds             |  4 ++--
> >   arch/arm/cpu/armv8/u-boot.lds                 |  4 ++--
> >   arch/arm/cpu/u-boot-spl.lds                   |  4 ++--
> >   arch/arm/cpu/u-boot.lds                       |  6 ++---
> >   arch/arm/mach-at91/arm926ejs/u-boot-spl.lds   |  2 +-
> >   arch/arm/mach-at91/armv7/u-boot-spl.lds       |  2 +-
> >   arch/arm/mach-omap2/u-boot-spl.lds            |  4 ++--
> >   arch/arm/mach-orion5x/u-boot-spl.lds          |  4 ++--
> >   arch/arm/mach-rockchip/u-boot-tpl-v8.lds      |  4 ++--
> >   arch/arm/mach-zynq/u-boot-spl.lds             |  4 ++--
> >   arch/arm/mach-zynq/u-boot.lds                 |  4 ++--
> >   arch/m68k/cpu/u-boot.lds                      |  4 ++--
> >   arch/microblaze/cpu/u-boot-spl.lds            |  4 ++--
> >   arch/microblaze/cpu/u-boot.lds                |  4 ++--
> >   arch/mips/config.mk                           |  2 +-
> >   arch/mips/cpu/u-boot-spl.lds                  |  4 ++--
> >   arch/mips/cpu/u-boot.lds                      |  4 ++--
> >   arch/nds32/cpu/n1213/u-boot.lds               |  4 ++--
> >   arch/nios2/cpu/u-boot.lds                     |  4 ++--
> >   arch/powerpc/cpu/mpc83xx/u-boot.lds           |  4 ++--
> >   arch/powerpc/cpu/mpc85xx/u-boot-nand.lds      |  4 ++--
> >   arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds  |  4 ++--
> >   arch/powerpc/cpu/mpc85xx/u-boot-spl.lds       |  4 ++--
> >   arch/powerpc/cpu/mpc85xx/u-boot.lds           |  4 ++--
> >   arch/riscv/cpu/u-boot-spl.lds                 |  4 ++--
> >   arch/riscv/cpu/u-boot.lds                     |  4 ++--
> >   arch/sandbox/config.mk                        |  4 ++--
> >   arch/sandbox/cpu/u-boot-spl.lds               |  4 ++--
> >   arch/sandbox/cpu/u-boot.lds                   |  4 ++--
> >   arch/sh/cpu/u-boot.lds                        |  4 ++--
> >   arch/x86/cpu/u-boot-64.lds                    |  6 ++---
> >   arch/x86/cpu/u-boot-spl.lds                   |  6 ++---
> >   arch/x86/cpu/u-boot.lds                       |  6 ++---
> >   arch/x86/lib/elf_ia32_efi.lds                 |  4 ++--
> >   arch/x86/lib/elf_x86_64_efi.lds               |  4 ++--
>
> @Simon
>
> This looks inconsistent.
>
> Why should section u_boot_list exist in elf_x86_64_efi.lds and not in
> elf_riscv64_efi.lds?

For clarity, you don't mean this is a problem with this patch? But a
problem with the riscv port not including linker lists in its linker
script?

> The sandbox is built and used on all architectures.

The sandbox is built as its own "architecture" arch/sandbox that is
based on something like a Linux environment rather than a hardware
architecture, since sandbox runs in user space.


More information about the U-Boot mailing list