klibc-bot for Ben Hutchings
2020-Dec-13 00:24 UTC
[klibc] [klibc:master] Replace all the remaining instances of -Ttext-segment
Commit-ID: bef2465c25ee052677e930d6712cd536f1483c9b Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=bef2465c25ee052677e930d6712cd536f1483c9b Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Fri, 28 Aug 2020 04:17:02 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 12 Dec 2020 23:53:42 +0100 [klibc] Replace all the remaining instances of -Ttext-segment Not all of these architectures are supported by LLVM yet, but let's be consistent anyway. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/klibc/arch/alpha/MCONFIG | 2 +- usr/klibc/arch/arm/MCONFIG | 4 ++-- usr/klibc/arch/m68k/MCONFIG | 2 +- usr/klibc/arch/mips/MCONFIG | 4 +--- usr/klibc/arch/mips64/MCONFIG | 3 --- usr/klibc/arch/parisc/MCONFIG | 2 +- usr/klibc/arch/s390/MCONFIG | 2 +- usr/klibc/arch/sh/MCONFIG | 2 +- usr/klibc/arch/sparc/MCONFIG | 2 +- 9 files changed, 9 insertions(+), 14 deletions(-) diff --git a/usr/klibc/arch/alpha/MCONFIG b/usr/klibc/arch/alpha/MCONFIG index e71db264..64847b70 100644 --- a/usr/klibc/arch/alpha/MCONFIG +++ b/usr/klibc/arch/alpha/MCONFIG @@ -13,7 +13,7 @@ KLIBCBITSIZE = 64 # calls, and work on the memory models for this architecture # 7 GB - normal binaries start at 4.5 GB, and the stack is below # the binary. -KLIBCSHAREDFLAGS = -Ttext-segment 0x1c0000000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x1c0000000 # Kernel uses our sa_restorer for signal return KLIBCEXECSTACK := n diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG index ae407cb9..dabefc54 100644 --- a/usr/klibc/arch/arm/MCONFIG +++ b/usr/klibc/arch/arm/MCONFIG @@ -21,12 +21,12 @@ KLIBCREQFLAGS += -mthumb KLIBCLDFLAGS += --thumb-entry _start KLIBCEMAIN = --thumb-entry main KLIBCREQFLAGS += -mabi=aapcs-linux -KLIBCSHAREDFLAGS = -Ttext-segment 0x380000 +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 = -Ttext-segment 0x01800000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x01800000 ifeq ($(CONFIG_AEABI),y) KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork else diff --git a/usr/klibc/arch/m68k/MCONFIG b/usr/klibc/arch/m68k/MCONFIG index b57714e4..79bfbac6 100644 --- a/usr/klibc/arch/m68k/MCONFIG +++ b/usr/klibc/arch/m68k/MCONFIG @@ -16,7 +16,7 @@ KLIBCBITSIZE = 32 # 2816 MB - normal binaries start at 2048 MB if I read the link # script right. Not sure if there is a fundamental reason # to not duck below the halfway point... -KLIBCSHAREDFLAGS = -Ttext-segment 0xb0000000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0xb0000000 # Kernel uses stack trampoline for signal return. Also m68k # page tables do not have an execute permission bit. diff --git a/usr/klibc/arch/mips/MCONFIG b/usr/klibc/arch/mips/MCONFIG index 7bf65a50..48cda8e4 100644 --- a/usr/klibc/arch/mips/MCONFIG +++ b/usr/klibc/arch/mips/MCONFIG @@ -15,9 +15,7 @@ KLIBCBITSIZE = 32 # This address needs to be reachable using normal inter-module # calls, and work on the memory models for this architecture # 2 MB - normal binaries start at 4 MB -# -# Use -Ttext-segment so that the special .MIPS* sections are moved as well. -KLIBCSHAREDFLAGS = -Ttext-segment 0x00200000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x00200000 # Kernel uses vDSO for signal return since 2.6.34 KLIBCEXECSTACK := n diff --git a/usr/klibc/arch/mips64/MCONFIG b/usr/klibc/arch/mips64/MCONFIG index 6dcb143e..ae879f49 100644 --- a/usr/klibc/arch/mips64/MCONFIG +++ b/usr/klibc/arch/mips64/MCONFIG @@ -18,9 +18,6 @@ KLIBCBITSIZE = 64 # use the JAL instruction which requires a destination within the same # 256M aligned region. Since we can't put ourselves below the normal # load address, use the very top of the 256M region (minus 2MB) -# -# Use -Ttext-segment/--image_base so that the special .MIPS* sections -# are moved as well. KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x12FE00000 # Kernel uses vDSO for signal return since 2.6.34 diff --git a/usr/klibc/arch/parisc/MCONFIG b/usr/klibc/arch/parisc/MCONFIG index 1f53555e..bc8bd9b9 100644 --- a/usr/klibc/arch/parisc/MCONFIG +++ b/usr/klibc/arch/parisc/MCONFIG @@ -9,7 +9,7 @@ KLIBCOPTFLAGS += -Os -fomit-frame-pointer KLIBCBITSIZE = 32 -KLIBCSHAREDFLAGS = -Ttext-segment 0x40001000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x40001000 # Kernel uses stack trampoline for signal return KLIBCEXECSTACK := y diff --git a/usr/klibc/arch/s390/MCONFIG b/usr/klibc/arch/s390/MCONFIG index 7ffbcc45..a704c5af 100644 --- a/usr/klibc/arch/s390/MCONFIG +++ b/usr/klibc/arch/s390/MCONFIG @@ -20,7 +20,7 @@ else endif KLIBCASMARCH = s390 -KLIBCSHAREDFLAGS = -Ttext-segment 0x40000000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x40000000 # Kernel uses our sa_restorer for signal return KLIBCEXECSTACK := n diff --git a/usr/klibc/arch/sh/MCONFIG b/usr/klibc/arch/sh/MCONFIG index 8421bbf9..43d608c2 100644 --- a/usr/klibc/arch/sh/MCONFIG +++ b/usr/klibc/arch/sh/MCONFIG @@ -14,7 +14,7 @@ KLIBCBITSIZE = 32 # This address needs to be reachable using normal inter-module # calls, and work on the memory models for this architecture # 2 MB -- the normal starting point for text is 4 MB. -KLIBCSHAREDFLAGS = -Ttext-segment 0x00200000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x00200000 # Kernel uses vDSO for signal return since 2.6.19 KLIBCEXECSTACK := n diff --git a/usr/klibc/arch/sparc/MCONFIG b/usr/klibc/arch/sparc/MCONFIG index fb68ba3f..623223dc 100644 --- a/usr/klibc/arch/sparc/MCONFIG +++ b/usr/klibc/arch/sparc/MCONFIG @@ -16,7 +16,7 @@ KLIBCARCHREQFLAGS += -D__sparc32__ # calls, and work on the memory models for this architecture # Normal binaries start at 64K; the linker wants 64K alignment, # and call instructions have a 30-bit signed offset, << 2. -KLIBCSHAREDFLAGS = -Ttext-segment 0x40000000 +KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x40000000 # Kernel uses our sa_restorer for signal return KLIBCEXECSTACK := n