aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 0310b00..27053f3 100644
--- a/Makerules
+++ b/Makerules
@@ -493,7 +493,11 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_print_version
# Use our own special initializer and finalizer files for libc.so.
+ifeq (elf, $(subdir))
+elfobjdir := .
+else
elfobjdir := $(firstword $(objdir) $(..)elf)
+endif
$(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
$(common-objpfx)libc_pic.a \
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so