Skip to content

x86_64: build with -mabi=ms .#812

Draft
vathpela wants to merge 5 commits into
rhboot:mainfrom
vathpela:dashmabims
Draft

x86_64: build with -mabi=ms .#812
vathpela wants to merge 5 commits into
rhboot:mainfrom
vathpela:dashmabims

Conversation

@vathpela

Copy link
Copy Markdown
Member

No description provided.

vathpela added 5 commits July 15, 2026 15:34
This adds a small amount to our logs like such:

  pe.c:863:handle_image() Loading section 0 ".text" at 0x7C34E000
  pe.c:863:handle_image() Loading section 1 ".data" at 0x7C368000
  pe.c:863:handle_image() Loading section 2 "mods" at 0x7C379000
  pe.c:863:handle_image() Loading section 3 ".sbat" at 0x7C725000

Signed-off-by: Peter Jones <pjones@redhat.com>
This splits the arch-specific ARCH_CFLAGS into two variables,
ARCH_TEST_CFLAGS (used for "make test"), and ARCH_CFLAGS (for everything
else), which is generally expected to be a superset of the former.

Signed-off-by: Peter Jones <pjones@redhat.com>
This moves shim/fb/mm's read-only data to its own section, so that it
can properly be read-only.

Signed-off-by: Peter Jones <pjones@redhat.com>
This patch changes shim on x86_64 to be built entirely with the
Microsoft x64 ABI.  In doing so it adds a macro "SYSVAPI" that
corresponds with the opposite of EFIAPI, and uses that to declare the
legacy shim lock protocol.

This improves a number of things, not least it means if there's a bug in
shim, the firmware backtrace code should be able to show an accurate
dump of the call stack.

Signed-off-by: Peter Jones <pjones@redhat.com>
More recent gnu-efi accepts two separate build variables,
OPTIMIZATION_CFLAGS and DEBUG_CFLAGS, to set optimizations and debuginfo
generating arguments.

This adds those, setting OPTIMIZATION_CFLAGS to our internal
OPTIMIZATIONS variable, and DEBUG_CFLAGS to "-ggdb -gdwarf-4
-gstrict-dwarf".

With these, gdb can give us backtraces from shim all the way up into
EFI.

Signed-off-by: Peter Jones <pjones@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant