summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/custom/pc386.cfg10
1 files changed, 7 insertions, 3 deletions
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index e642a8baf9..8879e165b4 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -85,9 +85,13 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CFLAGS) $(CFLAGS_LD) -Ttext $(RELOCADDR) -o $(basename $@).obj $(LINK_OBJS)
- $(OBJCOPY) -O a.out-i386 --remove-section=.rodata --strip-unneeded \
- $(basename $@).obj $@
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext -Wl,$(RELOCADDR) \
+ -o $(basename $@).obj $(LINK_OBJS)
+ $(OBJCOPY) -O a.out-i386 \
+ --remove-section=.rodata \
+ --remove-section=.comment \
+ --remove-section=.note \
+ --strip-unneeded $(basename $@).obj $@
$(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
$(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0