diff options
Diffstat (limited to 'usr/klibc/arch/arm/MCONFIG')
-rw-r--r-- | usr/klibc/arch/arm/MCONFIG | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG index 41f39a0e09e7d..db5b14ac59b8f 100644 --- a/usr/klibc/arch/arm/MCONFIG +++ b/usr/klibc/arch/arm/MCONFIG @@ -19,12 +19,8 @@ ifeq ($(CONFIG_KLIBC_THUMB),y) CPU_ARCH := $(CPU_ARCH)t KLIBCREQFLAGS += -mthumb KLIBCREQFLAGS += -mabi=aapcs-linux -KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x380000 else # Extra linkflags when building the shared version of the library -# This address needs to be reachable using normal inter-module -# calls, and work on the memory models for this architecture -KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x01800000 ifeq ($(CONFIG_AEABI),y) KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork else @@ -32,5 +28,13 @@ KLIBCREQFLAGS += -mabi=apcs-gnu -mno-thumb-interwork endif endif +# Normal binaries start at 64 kiB. A32 branch instructions have a +# range of ±32 MiB and T32 branch instructions only ±16 MiB, so we +# have to put klibc.so in that range. Putting it close above the +# executable can cause breakage, so instead swap them around: +# klibc.so at 2 MiB and executable at 4 MiB. +KLIBCLDFLAGS = $(LD_IMAGE_BASE_OPT) 0x400000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x200000 + # Kernel uses dedicated page or vDSO for signal return since 2.6.13 KLIBCEXECSTACK := n |