[boot-wrapper PATCH v2 3/9] Makefile: Tell compiler to generate bare-metal code

Ard Biesheuvel ardb at kernel.org
Tue Jan 18 06:10:50 PST 2022


On Tue, 18 Jan 2022 at 13:53, Andre Przywara <andre.przywara at arm.com> wrote:
>
> On Tue, 11 Jan 2022 11:30:18 +0000
> Mark Rutland <mark.rutland at arm.com> wrote:
>
> > I don't understand why we need:
> >
> >       -fno-common
>
> I think most projects use that to put uninitialised global variables in
> .BSS, to save space in .data and thus the image file. I see it used in all
> of Linux, U-Boot and TF-A. With the kernel image absolutely dwarfing any
> actual boot-wrapper code in our ELF file, I think we are not particularly
> sensitive about code/file size, though, are we?
>

I'd keep this for correctness, otherwise unrelated uninitialized
globals with external linkage that happen to have the same name will
be merged into a single variable, instead of causing a duplicate
symbol error at link time (which is usually the preferred result)



More information about the linux-arm-kernel mailing list