[syslinux:firmware] core: Rebuild core objects for EFI
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Fri Nov 9 09:06:08 PST 2012
Commit-ID: de65c9df7c0302d053c4a47f60b31c641cce97a7
Gitweb: http://www.syslinux.org/commit/de65c9df7c0302d053c4a47f60b31c641cce97a7
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Tue, 6 Dec 2011 15:45:51 +0000
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 16 Dec 2011 16:31:19 +0000
core: Rebuild core objects for EFI
We compile core/ with different CFLAGS when building for EFI. So do a
make clean once we've built the binary targets (BTARGET) but before we
build the EFI executable.
---
core/Makefile | 2 +-
mk/efi.mk | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/Makefile b/core/Makefile
index 5288da6..c55a12a 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -74,7 +74,7 @@ ifndef DATE
DATE := $(shell sh ../gen-id.sh $(VERSION) $(HEXDATE))
endif
-all: $(BTARGET)
+all: $(BTARGET) clean
kwdhash.gen: keywords genhash.pl
$(PERL) genhash.pl < keywords > kwdhash.gen
diff --git a/mk/efi.mk b/mk/efi.mk
index c6c93a2..e461448 100644
--- a/mk/efi.mk
+++ b/mk/efi.mk
@@ -10,14 +10,14 @@ FORMAT=efi-app-$(ARCH)
CFLAGS = -I/usr/include/efi -I/usr/include/efi/$(ARCH) \
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
-Wall -I$(com32)/include -I$(core)/include -m32 -march=i686 \
- -I$(com32)/lib/ -std=gnu99
+ -I$(com32)/lib/ -std=gnu99 -DELF_DEBUG -DSYSLINUX_EFI
# gnuefi sometimes installs these under a gnuefi/ directory, and sometimes not
CRT0 := $(shell find $(LIBDIR) -name crt0-efi-$(ARCH).o 2>/dev/null | tail -n1)
LDSCRIPT := $(shell find $(LIBDIR) -name elf_$(ARCH)_efi.lds 2>/dev/null | tail -n1)
-LDFLAGS = -T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -znocombreloc \
- -L$(LIBDIR) $(CRT0)
+LDFLAGS = -T syslinux.ld -Bsymbolic -pie -nostdlib -znocombreloc \
+ -L$(LIBDIR) --hash-style=gnu -m elf_i386 $(CRT0) -E
SFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \
-fomit-frame-pointer -D__COM32__ \
@@ -32,6 +32,6 @@ SFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
-%.efi: %.so
- $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
- -j .rela -j .reloc --target=$(FORMAT) $*.so $@
+#%.efi: %.so
+# $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
+# -j .rela -j .reloc --target=$(FORMAT) $*.so $@
More information about the Syslinux-commits
mailing list