From a33796043bdef5345bc00a528c942f91a87af8e9 Mon Sep 17 00:00:00 2001 From: Filippo Arcidiacono Date: Mon, 2 Aug 2010 17:23:35 +0200 Subject: ldso: Add runtime prelink support Added runtime prelink support to be able to run a prelinked application; at process startup only the conflicts will be relocated. This speed up the startup time. Signed-off-by: Filippo Arcidiacono Signed-off-by: Carmelo Amoroso --- Makerules | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makerules') diff --git a/Makerules b/Makerules index 2e9ca05bf..435ccfd9e 100644 --- a/Makerules +++ b/Makerules @@ -294,6 +294,15 @@ endef cmd_hcompile.u = $(HOSTCC) $(filter-out $(PHONY),$^) $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@)) cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@)) +define create-lds + $(Q)$(RM) $@.lds + $(Q)$(CC) -nostdlib -nostartfiles -shared -Wl,-z,combreloc \ + -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \ + -Wl,--verbose 2>&1 | LC_ALL=C \ + sed -e '/^=========/,/^=========/!d;/^=========/d' \ + -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds +endef + define link.so $(Q)$(RM) $@ $@.$(2) $(dir $@)$(1) @$(disp_ld) -- cgit v1.2.3