Skip to contentSkip to conversation

efi_loader: initrddump: Actually use the custom CFLAGS

PATCH In review Andy Shevchenko 2 participants 2 messages Mar 30, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi_loader: initrddump: Actually use the custom CFLAGS

It seems a copy'n'paste typo when tool had been introduced. It has never had the 'exit' suffix in the file name. Hence, the custom CFLAGS never been applied and, for example, BFD linker complains:

LD lib/efi_loader/initrddump_efi.so
ld.bfd: lib/efi_loader/initrddump.o: warning: relocation in read-only section `.text.efi_main' ld.bfd: warning: creating DT_TEXTREL in a shared object

Remove wrong 'exit' suffix from the custom CFLAGS variable.

Fixes 65ab48d69ddb ("efi_selftest: provide initrddump test tool")
---
 lib/efi_loader/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/efi_loader/Makefile +1 -1
index befed7144e78..034d26cf0109 100644
@@ -16,7 +16,7 @@ CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
 CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI)
-CFLAGS_initrddump_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
+CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI)
 
 ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Andy Shevchenko

It seems a copy'n'paste typo when tool had been introduced. It has never had the 'exit' suffix in the file name. Hence, the custom CFLAGS never been applied and, for example, BFD linker complains:

Quoted 8 lines

LD lib/efi_loader/initrddump_efi.so
ld.bfd: lib/efi_loader/initrddump.o: warning: relocation in read-only section `.text.efi_main' ld.bfd: warning: creating DT_TEXTREL in a shared object

Remove wrong 'exit' suffix from the custom CFLAGS variable.

Fixes 65ab48d69ddb ("efi_selftest: provide initrddump test tool")
Quoted 17 lines
---
  lib/efi_loader/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/efi_loader/Makefile +1 -1
index befed7144e78..034d26cf0109 100644
@@ -16,7 +16,7 @@ CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
  CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
  CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding
  CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI)
-CFLAGS_initrddump_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
+CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding
  CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI)
 
  ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)