Commit 6764c153 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 5d03b52f
...@@ -52,9 +52,10 @@ OBJS += ipc_ns.o ...@@ -52,9 +52,10 @@ OBJS += ipc_ns.o
OBJS-BLOB += parasite.o OBJS-BLOB += parasite.o
SRCS-BLOB += $(patsubst %.o,%.c,$(OBJS-BLOB)) SRCS-BLOB += $(patsubst %.o,%.c,$(OBJS-BLOB))
PIE-LDS := pie.lds.S
HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB)) HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB))
HEAD-BIN := $(patsubst %.o,%.bin,$(OBJS-BLOB)) HEAD-BIN := $(patsubst %.o,%.bin,$(OBJS-BLOB))
HEAD-LDS := $(patsubst %.o,%.lds.S,$(OBJS-BLOB))
ROBJS-BLOB := restorer.o ROBJS-BLOB := restorer.o
# #
...@@ -69,7 +70,6 @@ RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB)) ...@@ -69,7 +70,6 @@ RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB))
RHEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(ROBJS-BLOB)) RHEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(ROBJS-BLOB))
RHEAD-BIN := $(patsubst %.o,%.bin,$(ROBJS-BLOB)) RHEAD-BIN := $(patsubst %.o,%.bin,$(ROBJS-BLOB))
RHEAD-LDS := $(patsubst %.o,%.lds.S,$(ROBJS-BLOB))
DEPS := $(patsubst %.o,%.d,$(OBJS)) \ DEPS := $(patsubst %.o,%.d,$(OBJS)) \
$(patsubst %.o,%.d,$(OBJS-BLOB)) \ $(patsubst %.o,%.d,$(OBJS-BLOB)) \
...@@ -87,9 +87,9 @@ parasite-util-net.o: util-net.c ...@@ -87,9 +87,9 @@ parasite-util-net.o: util-net.c
$(E) " CC " $@ $(E) " CC " $@
$(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@ $(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 " $@ $(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) $(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@ $(E) " GEN " $@
...@@ -100,9 +100,9 @@ $(ROBJS): $(RSRCS-BLOB) ...@@ -100,9 +100,9 @@ $(ROBJS): $(RSRCS-BLOB)
$(E) " CC " $@ $(E) " CC " $@
$(Q) $(CC) -c $(CFLAGS) -fpic $(patsubst %.o,%.c,$@) -o $@ $(Q) $(CC) -c $(CFLAGS) -fpic $(patsubst %.o,%.c,$@) -o $@
$(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS) $(RHEAD-BIN): $(ROBJS) $(PIE-LDS)
$(E) " GEN " $@ $(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) $(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@ $(E) " GEN " $@
......
OUTPUT_FORMAT("binary")
OUTPUT_ARCH(i386:x86-64)
SECTIONS
{
. = 0;
.text : {
*(.head.text)
*(.text)
. = ALIGN(8);
}
.data : {
*(.data)
*(.rodata)
*(.bss)
. = ALIGN(8);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment