diff options
Diffstat (limited to 'linker/Android.mk')
| -rw-r--r-- | linker/Android.mk | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/linker/Android.mk b/linker/Android.mk index 6c26eb3..4647c8f 100644 --- a/linker/Android.mk +++ b/linker/Android.mk @@ -4,6 +4,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ arch/$(TARGET_ARCH)/begin.S \ linker.c \ + linker_format.c \ rt.c \ dlfcn.c \ debugger.c \ @@ -13,7 +14,12 @@ ifeq ($(TARGET_ARCH),sh) # SH-4A series virtual address range from 0x00000000 to 0x7FFFFFFF. LINKER_TEXT_BASE := 0x70000100 else -LINKER_TEXT_BASE := 0xB0000100 +# This is aligned to 4K page boundary so that both GNU ld and gold work. Gold +# actually produces a correct binary with starting address 0xB0000100 but the +# extra objcopy step to rename symbols causes the resulting binary to be misaligned +# and unloadable. Increasing the alignment adds an extra 3840 bytes in padding +# but switching to gold saves about 1M of space. +LINKER_TEXT_BASE := 0xB0001000 endif # The maximum size set aside for the linker, from @@ -26,8 +32,16 @@ LOCAL_CFLAGS += -DPRELINK LOCAL_CFLAGS += -DLINKER_TEXT_BASE=$(LINKER_TEXT_BASE) LOCAL_CFLAGS += -DLINKER_AREA_SIZE=$(LINKER_AREA_SIZE) +# Set LINKER_DEBUG to either 1 or 0 +# +LOCAL_CFLAGS += -DLINKER_DEBUG=0 + # we need to access the Bionic private header <bionic_tls.h> -# in the linker +# in the linker; duplicate the HAVE_ARM_TLS_REGISTER definition +# from the libc build +ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true) + LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER +endif LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/private ifeq ($(TARGET_ARCH),arm) |
