1
LOCAL_PATH:= $(call my-dir)
5
arch/$(TARGET_ARCH)/begin.S \
13
LOCAL_LDFLAGS := -shared
15
LOCAL_CFLAGS += -fno-stack-protector \
19
# Set LINKER_DEBUG to either 1 or 0
21
LOCAL_CFLAGS += -DLINKER_DEBUG=0
23
# we need to access the Bionic private header <bionic_tls.h>
24
# in the linker; duplicate the HAVE_ARM_TLS_REGISTER definition
26
ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
27
LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
29
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/private
31
ifeq ($(TARGET_ARCH),arm)
32
LOCAL_CFLAGS += -DANDROID_ARM_LINKER
34
ifeq ($(TARGET_ARCH),x86)
35
LOCAL_CFLAGS += -DANDROID_X86_LINKER
41
LOCAL_STATIC_LIBRARIES := libc_nomalloc
43
#LOCAL_FORCE_STATIC_EXECUTABLE := true # not necessary when not including BUILD_EXECUTABLE
46
# include $(BUILD_EXECUTABLE)
48
# Instead of including $(BUILD_EXECUTABLE), we execute the steps to create an executable by
49
# hand, as we want to insert an extra step that is not supported by the build system, and
50
# is probably specific the linker only, so there's no need to modify the build system for
53
LOCAL_MODULE_CLASS := EXECUTABLES
54
LOCAL_MODULE_SUFFIX := $(TARGET_EXECUTABLE_SUFFIX)
56
# we don't want crtbegin.o (because we have begin.o), so unset it
57
# just for this module
60
include $(BUILD_SYSTEM)/dynamic_binary.mk
62
$(linked_module): $(TARGET_CRTBEGIN_STATIC_O) $(all_objects) $(all_libraries) $(TARGET_CRTEND_O)
63
$(transform-o-to-static-executable)
64
@echo "target PrefixSymbols: $(PRIVATE_MODULE) ($@)"
65
$(hide) $(TARGET_OBJCOPY) --prefix-symbols=__dl_ $@
68
# end of BUILD_EXECUTABLE hack