[RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain

Ilias Apalodimas ilias.apalodimas at linaro.org
Tue May 23 08:54:59 CEST 2023


On Mon, May 22, 2023 at 01:37:26PM -0600, Sam Edwards wrote:
> Hi Ilias,
>
> On 5/22/23 00:52, Ilias Apalodimas wrote:
> > I can help clean up the arm architecture even further.  I was toying
> > with the idea of having page-aligned sections and eventually map
> > u-boot with proper permissions per section.  Right now (at least for
> > the majority of arm platforms) we are doing RWX for all the memory,
> > apart from devices that are mapped as RW. I do have an awfully hacky
> > PoC around, but the linker script cleanup is more than welcome.
>
> Glad to hear it (and excited by the idea of proper W^X)!

Yes that's my end goal here.  Looking around the code we have in U-Boot
regarding the mmu configuration, it's a lot easier (and cleaner) to fix
the linker script, add symbols for ro_start, rw_start etc and layout the
binary in a way we can easily map it, instead of leaving it as is and try
to fix the mapping in c code.

> The linker script
> cleanup (i.e. deleting those pesky `sections.c` files and going back to
> linker-assigned symbols) can really happen whenever; it won't cause a
> problem on any version of GNU ld from <7 years ago. Perhaps a series of
> patches (one per arch) doing that should be landed first?

Yes probably, because I specifically remember digging through the history
of why the sections were defined like that in the first place.

>
> > It's probably not a mailing list issue.  I only got the efi related
> > patches on my mailbox.  The recipients were generated with
> > get_maintainers.pl?  Heinirch and I only received the efi* portions as
> > we maintain that subsystem
>
> Well, it's true that you and Heinrich weren't Cc: on every email in the
> series. I just went with patman's default behavior.
>
> But every patch was sent To: the u-boot list, and I do see the whole series
> showing up on the archive. Did you not even receive the other patches in the
> series via the list?
>
> Cheers,
> Sam

Cheers
/Ilias


More information about the U-Boot mailing list