Skip to content
Snippets Groups Projects
Commit 2dcd4e9e authored by Simon Glass's avatar Simon Glass Committed by Alexander Graf
Browse files

x86: Move efi .S files into the 'lib' directory


These files now need to be in a standard place so that they can be located
by generic Makefile rules. Move them to the 'lib' directory.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent d36badfd
No related branches found
No related tags found
No related merge requests found
...@@ -1140,7 +1140,7 @@ quiet_cmd_u-boot_payload ?= LD $@ ...@@ -1140,7 +1140,7 @@ quiet_cmd_u-boot_payload ?= LD $@
cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \ cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \
-T u-boot-payload.lds arch/x86/cpu/call32.o \ -T u-boot-payload.lds arch/x86/cpu/call32.o \
lib/efi/efi.o lib/efi/efi_stub.o u-boot.bin.o \ lib/efi/efi.o lib/efi/efi_stub.o u-boot.bin.o \
$(addprefix arch/$(ARCH)/lib/efi/,$(EFISTUB)) $(addprefix arch/$(ARCH)/lib/,$(EFISTUB))
u-boot-payload: u-boot.bin.o u-boot-payload.lds FORCE u-boot-payload: u-boot.bin.o u-boot-payload.lds FORCE
$(call if_changed,u-boot_payload) $(call if_changed,u-boot_payload)
......
...@@ -46,7 +46,7 @@ endif ...@@ -46,7 +46,7 @@ endif
EFIPAYLOAD_BFDARCH = i386 EFIPAYLOAD_BFDARCH = i386
LDSCRIPT_EFI := $(srctree)/arch/x86/lib/elf_$(EFIARCH)_efi.lds LDSCRIPT_EFI := $(srctree)/arch/x86/lib/elf_$(EFIARCH)_efi.lds
EFISTUB := crt0-efi-$(EFIARCH).o reloc_$(EFIARCH).o EFISTUB := crt0_$(EFIARCH)_efi.o reloc_$(EFIARCH)_efi.o
OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH) OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH)
CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI) CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI)
......
...@@ -44,3 +44,21 @@ NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name) ...@@ -44,3 +44,21 @@ NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
OBJCOPYFLAGS := --prefix-symbols=__normal_ OBJCOPYFLAGS := --prefix-symbols=__normal_
$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE $(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
ifneq ($(CONFIG_EFI_STUB),)
CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
# When building for 64-bit we must remove the i386-specific flags
CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
endif
File moved
File moved
...@@ -7,21 +7,3 @@ ...@@ -7,21 +7,3 @@
obj-$(CONFIG_EFI_STUB) += car.o obj-$(CONFIG_EFI_STUB) += car.o
obj-$(CONFIG_EFI_STUB) += efi.o obj-$(CONFIG_EFI_STUB) += efi.o
obj-$(CONFIG_EFI_APP) += crt0-efi-ia32.o reloc_ia32.o
ifneq ($(CONFIG_EFI_STUB),)
CFLAGS_REMOVE_reloc_ia32.o += -mregparm=3
CFLAGS_reloc_ia32.o += -fpic -fshort-wchar
# When building for 64-bit we must remove the i386-specific flags
CFLAGS_REMOVE_reloc_x86_64.o += -mregparm=3 -march=i386 -m32
CFLAGS_reloc_x86_64.o += -fpic -fshort-wchar
AFLAGS_REMOVE_crt0-efi-x86_64.o += -mregparm=3 -march=i386 -m32
AFLAGS_crt0-efi-x86_64.o += -fpic -fshort-wchar
extra-$(CONFIG_EFI_STUB_32BIT) += crt0-efi-ia32.o reloc_ia32.o
extra-$(CONFIG_EFI_STUB_64BIT) += crt0-efi-x86_64.o reloc_x86_64.o
endif
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment