[PATCH 14/32] efi: Rename ImageBase to image_base

Tom Rini trini at konsulko.com
Fri Feb 7 02:44:42 CET 2025


On Thu, Feb 06, 2025 at 05:49:55PM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Thu, 6 Feb 2025 at 16:24, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Thu, Feb 06, 2025 at 02:27:30PM -0700, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Mon, 3 Feb 2025 at 13:09, Tom Rini <trini at konsulko.com> wrote:
> > > >
> > > > On Mon, Feb 03, 2025 at 10:42:07AM -0700, Simon Glass wrote:
> > > >
> > > > > It is confusing to have a camel-case indentifier in the link scripts.
> > > > > Rename it to fit with U-Boot's snake-case style.
> > > > >
> > > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > >
> > > > This isn't the linker script, it's the crt0 file.
> > >
> > > Yes, it's referred to in the x86 linker scripts. Probably we should
> > > rationalise some of these names.
> > >
> > > > Given that this is intended to match up with
> > > > https://learn.microsoft.com/en-us/windows/win32/debug/pe-format (which I
> > > > got from looking at the commit message on commit 216459d2cf36
> > > > ("efi_loader: correct SizeOfCode, SizeOfInitializedData") and
> > > > include/pe.h I don't think this is a good change. Heinrich?
> > >
> > > Well, pe.h is a file format so I don't believe we need to use the same
> > > code style. We had that discussion when the EFI code was coming in,
> > > and decided that it wasn't a good idea (as I recall).
> >
> > I really don't think our linker script for making a specific output type
> > should deviate from how the output type talks about things. Deviation is
> > confusing.
> 
> Well in that case, it is pe.h that needs to change. The original file
> I brought in was there because I was planning to add ARM support at
> the time. As it turns out, the file isn't needed for arm64, so this
> series removes most of it. For 32-bit ARM, the file is not used at all
> (although Heinrich might correct me if sandbox on 32-bit ARM uses
> it?). See:
> 
> arch/sandbox/lib/crt0_sandbox_efi.S

We likely shouldn't be so broadly including <pe.h> within EFI and I'll
defer to Heinrich on if changing include/pe.h to non-CamelCase will make
the users more or less clear.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250206/6c282efb/attachment.sig>


More information about the U-Boot mailing list