From 065b37ca935374e1addea953a9b34dc838f59f67 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Mon, 18 Jul 2022 20:41:39 +0200 Subject: [PATCH] build: Update linker scripts and fix minor makefile issue --- common/GNUmakefile | 2 +- common/linker_bios.ld.in | 3 +-- common/linker_uefi_ia32.ld.in | 3 +-- common/linker_uefi_x86_64.ld.in | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/common/GNUmakefile b/common/GNUmakefile index 16e96534..c2a195f0 100644 --- a/common/GNUmakefile +++ b/common/GNUmakefile @@ -228,7 +228,7 @@ $(call MKESCAPE,$(BUILDDIR))/linker_stage2only.ld: linker_bios.ld.in mkdir -p '$(call SHESCAPE,$(BUILDDIR))' $(CROSS_CC) -x c -E -P -undef -DLINKER_STAGE2ONLY linker_bios.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_stage2only.ld' -$(call MKESCAPE,$(BUILDDIR))/limine_stage2only.elf: $(OBJ) ../libgcc-binaries/libgcc-i686.a +$(call MKESCAPE,$(BUILDDIR))/limine_stage2only.elf: $(OBJ) ../libgcc-binaries/libgcc-i686.a $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o $(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_stage2only.ld' $(CROSS_LD) '$(call OBJESCAPE,$^)' $(CROSS_LDFLAGS) $(INTERNAL_LDFLAGS) -T'$(call SHESCAPE,$(BUILDDIR))/linker_stage2only.ld' -o '$(call SHESCAPE,$@)' || \ ( echo "This error may mean that stage 2 was trying to use stage 3 symbols before loading stage 3" && \ diff --git a/common/linker_bios.ld.in b/common/linker_bios.ld.in index b0ff2971..1e33c243 100644 --- a/common/linker_bios.ld.in +++ b/common/linker_bios.ld.in @@ -87,7 +87,6 @@ SECTIONS } :data_s3 /DISCARD/ : { - *.a:*(*) - *.o(*) + *(.note .note.*) } } diff --git a/common/linker_uefi_ia32.ld.in b/common/linker_uefi_ia32.ld.in index c8cc5d0c..f5cb241a 100644 --- a/common/linker_uefi_ia32.ld.in +++ b/common/linker_uefi_ia32.ld.in @@ -85,7 +85,6 @@ SECTIONS __image_end = __data_end; /DISCARD/ : { - *.a:*(*) - *.o(*) + *(.note .note.*) } } diff --git a/common/linker_uefi_x86_64.ld.in b/common/linker_uefi_x86_64.ld.in index 90d2496f..dbe0b190 100644 --- a/common/linker_uefi_x86_64.ld.in +++ b/common/linker_uefi_x86_64.ld.in @@ -85,7 +85,6 @@ SECTIONS __image_end = __data_end; /DISCARD/ : { - *.a:*(*) - *.o(*) + *(.note .note.*) } }