From 8422baf5b7fb2de3cc530142e586509ca33ff771 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 18 Jun 2018 02:47:36 -0400 Subject: [PATCH] Use objcopy instead of ld for resource files --- compile.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile.mk b/compile.mk index f9c12ac0..c3bbbe1b 100644 --- a/compile.mk +++ b/compile.mk @@ -8,7 +8,6 @@ endif include $(RACK_DIR)/arch.mk -LD ?= ld OBJCOPY ?= objcopy FLAGS += -DVERSION=$(VERSION) @@ -75,5 +74,6 @@ build/%.m.o: %.m build/%.bin.o: % @mkdir -p $(@D) - $(LD) -r -b binary -o $@ $< - $(OBJCOPY) --rename-section .data=.rodata,alloc,load,readonly,data,contents $@ $@ +ifdef ARCH_LIN + $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@ +endif