endif
ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
-EFI_OBJS-$(XEN_BUILD_EFI) := efi/relocs-dummy.o
ifeq ($(CONFIG_LTO),y)
# Gather all LTO objects together
$(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --end-group
# Link it with all the binary objects
-prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o $(EFI_OBJS-y) FORCE
+prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o FORCE
$(call if_changed,ld)
prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o FORCE
$(call if_changed,ld)
else
-prelink.o: $(ALL_OBJS) $(ALL_LIBS) $(EFI_OBJS-y) FORCE
+prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE
$(call if_changed,ld)
prelink-efi.o: $(ALL_OBJS) $(ALL_LIBS) FORCE
}
puts("\t.section .reloc, \"a\", @progbits\n"
- "\t.balign 4\n"
- "\t.globl __base_relocs_start, __base_relocs_end\n"
- "__base_relocs_start:");
+ "\t.balign 4");
for ( i = 0; i < nsec; ++i )
{
diff_sections(NULL, NULL, NULL, 0, 0, 0, 0);
- puts("__base_relocs_end:");
-
close(in1);
close(in2);
.section .reloc, "a", @progbits
.balign 4
-GLOBAL(__base_relocs_start)
.long 0
.long 8
-GLOBAL(__base_relocs_end)
.globl VIRT_START, ALT_START
.equ VIRT_START, XEN_VIRT_START
#endif
#endif
-/*
- * ELF builds are linked to a fixed virtual address, and in principle
- * shouldn't have a .reloc section. However, due to the way EFI support is
- * currently implemented, retaining the .reloc section is necessary.
- */
-#if defined(XEN_BUILD_EFI) && !defined(EFI)
- . = ALIGN(4);
- DECL_SECTION(.reloc) {
- *(.reloc)
- } PHDR(text)
-#endif
-
_erodata = .;
. = ALIGN(SECTION_ALIGN);
__2M_rwdata_end = .;
#ifdef EFI
- . = ALIGN(4);
- DECL_SECTION(.reloc) {
+ .reloc ALIGN(4) : {
+ __base_relocs_start = .;
*(.reloc)
+ __base_relocs_end = .;
}
/* Trick the linker into setting the image size to exactly 16Mb. */
. = ALIGN(__section_alignment__);
DECL_SECTION(.pad) {
. = ALIGN(MB(16));
}
-#endif
-
-#ifndef XEN_BUILD_EFI
+#elif defined(XEN_BUILD_EFI)
+ /*
+ * Due to the way EFI support is currently implemented, these two symbols
+ * need to be defined. Their precise values shouldn't matter (the consuming
+ * function doesn't get called), but to be on the safe side both values would
+ * better match. Of course the need to be reachable by the relocations
+ * referencing them.
+ */
+ PROVIDE(__base_relocs_start = .);
+ PROVIDE(__base_relocs_end = .);
+#else
efi = .;
#endif