From 6764c15313ebe2a6bd6f1264077eb49f003dab30 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 18 Apr 2012 01:55:00 +0400 Subject: [PATCH] make: Squash parasite.lds.S and restorer.lds.S into pie.lds.S They are identical, no need to carry two copies. Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- Makefile | 12 ++++++------ parasite.lds.S => pie.lds.S | 0 restorer.lds.S | 18 ------------------ 3 files changed, 6 insertions(+), 24 deletions(-) rename parasite.lds.S => pie.lds.S (100%) delete mode 100644 restorer.lds.S diff --git a/Makefile b/Makefile index 019623ece..72505a0cf 100644 --- a/Makefile +++ b/Makefile @@ -52,9 +52,10 @@ OBJS += ipc_ns.o OBJS-BLOB += parasite.o SRCS-BLOB += $(patsubst %.o,%.c,$(OBJS-BLOB)) +PIE-LDS := pie.lds.S + HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB)) HEAD-BIN := $(patsubst %.o,%.bin,$(OBJS-BLOB)) -HEAD-LDS := $(patsubst %.o,%.lds.S,$(OBJS-BLOB)) ROBJS-BLOB := restorer.o # @@ -69,7 +70,6 @@ RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB)) RHEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(ROBJS-BLOB)) RHEAD-BIN := $(patsubst %.o,%.bin,$(ROBJS-BLOB)) -RHEAD-LDS := $(patsubst %.o,%.lds.S,$(ROBJS-BLOB)) DEPS := $(patsubst %.o,%.d,$(OBJS)) \ $(patsubst %.o,%.d,$(OBJS-BLOB)) \ @@ -87,9 +87,9 @@ parasite-util-net.o: util-net.c $(E) " CC " $@ $(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@ -$(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o +$(HEAD-BIN): $(PIE-LDS) $(OBJS-BLOB) parasite-util-net.o $(E) " GEN " $@ - $(Q) $(LD) -T $^ -o $@ + $(Q) $(LD) -T $(PIE-LDS) $(OBJS-BLOB) parasite-util-net.o -o $@ $(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS) $(E) " GEN " $@ @@ -100,9 +100,9 @@ $(ROBJS): $(RSRCS-BLOB) $(E) " CC " $@ $(Q) $(CC) -c $(CFLAGS) -fpic $(patsubst %.o,%.c,$@) -o $@ -$(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS) +$(RHEAD-BIN): $(ROBJS) $(PIE-LDS) $(E) " GEN " $@ - $(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) -o $@ $(ROBJS) + $(Q) $(LD) -T $(PIE-LDS) $(ROBJS) -o $@ $(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS) $(E) " GEN " $@ diff --git a/parasite.lds.S b/pie.lds.S similarity index 100% rename from parasite.lds.S rename to pie.lds.S diff --git a/restorer.lds.S b/restorer.lds.S deleted file mode 100644 index 74d9d9e41..000000000 --- a/restorer.lds.S +++ /dev/null @@ -1,18 +0,0 @@ -OUTPUT_FORMAT("binary") -OUTPUT_ARCH(i386:x86-64) - -SECTIONS -{ - . = 0; - .text : { - *(.head.text) - *(.text) - . = ALIGN(8); - } - .data : { - *(.data) - *(.rodata) - *(.bss) - . = ALIGN(8); - } -}