klibc-bot for Ben Hutchings
2019-Jan-20 22:51 UTC
[klibc] [klibc:master] Use -Ttext-segment to link shared library on all arches
Commit-ID: 72d6d78a8f0d24a64911c246487402c81b4beb9d Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=72d6d78a8f0d24a64911c246487402c81b4beb9d Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Sun, 20 Jan 2019 19:41:47 +0000 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sun, 20 Jan 2019 21:15:17 +0000 [klibc] Use -Ttext-segment to link shared library on all arches We previously changed mips and x86 to link the shared library with the -Ttext-segment option to avoid address collisions with extra sections automatically added by the linker (commits 048bfb0df170, 2a705525e081, 34163a2c7d1c). Adding a build ID to support separate debug info causes a similar problem on other architectures. Use -Ttext-segment on all architectures. 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/arm64/MCONFIG | 2 +- usr/klibc/arch/m68k/MCONFIG | 2 +- usr/klibc/arch/parisc/MCONFIG | 2 +- usr/klibc/arch/ppc/MCONFIG | 2 +- usr/klibc/arch/ppc64/MCONFIG | 2 +- usr/klibc/arch/riscv64/MCONFIG | 2 +- usr/klibc/arch/s390/MCONFIG | 2 +- usr/klibc/arch/sh/MCONFIG | 2 +- usr/klibc/arch/sparc/MCONFIG | 2 +- usr/klibc/arch/sparc64/MCONFIG | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/usr/klibc/arch/alpha/MCONFIG b/usr/klibc/arch/alpha/MCONFIG index e7dc61a..ad11372 100644 --- a/usr/klibc/arch/alpha/MCONFIG +++ b/usr/klibc/arch/alpha/MCONFIG @@ -13,4 +13,4 @@ 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 0x1c0000200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x1c0000000 diff --git a/usr/klibc/arch/arm/MCONFIG b/usr/klibc/arch/arm/MCONFIG index 53bc1dc..8a7096b 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 0x380200 +KLIBCSHAREDFLAGS = -Ttext-segment 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 0x01800200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x01800000 ifeq ($(CONFIG_AEABI),y) KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork else diff --git a/usr/klibc/arch/arm64/MCONFIG b/usr/klibc/arch/arm64/MCONFIG index 82664a7..6d22847 100644 --- a/usr/klibc/arch/arm64/MCONFIG +++ b/usr/klibc/arch/arm64/MCONFIG @@ -20,4 +20,4 @@ KLIBCREQFLAGS += -fno-exceptions -mgeneral-regs-only # On arm64, binaries are normally loaded at 4MB. Place klibc.so # a little before that at 2MB to prevent overlap. -KLIBCSHAREDFLAGS = -Ttext 0x0200000 +KLIBCSHAREDFLAGS = -Ttext-segment 0x0200000 diff --git a/usr/klibc/arch/m68k/MCONFIG b/usr/klibc/arch/m68k/MCONFIG index 7d4615d..3f4bdae 100644 --- a/usr/klibc/arch/m68k/MCONFIG +++ b/usr/klibc/arch/m68k/MCONFIG @@ -16,4 +16,4 @@ 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 0xb0000000 +KLIBCSHAREDFLAGS = -Ttext-segment 0xb0000000 diff --git a/usr/klibc/arch/parisc/MCONFIG b/usr/klibc/arch/parisc/MCONFIG index 628e987..3472df6 100644 --- a/usr/klibc/arch/parisc/MCONFIG +++ b/usr/klibc/arch/parisc/MCONFIG @@ -9,4 +9,4 @@ KLIBCOPTFLAGS += -Os -fomit-frame-pointer KLIBCBITSIZE = 32 -KLIBCSHAREDFLAGS = -Ttext 0x40001000 +KLIBCSHAREDFLAGS = -Ttext-segment 0x40001000 diff --git a/usr/klibc/arch/ppc/MCONFIG b/usr/klibc/arch/ppc/MCONFIG index 46c5923..8220f6b 100644 --- a/usr/klibc/arch/ppc/MCONFIG +++ b/usr/klibc/arch/ppc/MCONFIG @@ -20,7 +20,7 @@ KLIBCBITSIZE = 32 # calls, and work on the memory models for this architecture # 256-16 MB - normal binaries start at 256 MB, and jumps are limited # to +/- 16 MB -KLIBCSHAREDFLAGS = -Ttext 0x0f800200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x0f800000 # The asm include files live in asm-powerpc KLIBCASMARCH = powerpc diff --git a/usr/klibc/arch/ppc64/MCONFIG b/usr/klibc/arch/ppc64/MCONFIG index a147593..0315110 100644 --- a/usr/klibc/arch/ppc64/MCONFIG +++ b/usr/klibc/arch/ppc64/MCONFIG @@ -18,7 +18,7 @@ KLIBCBITSIZE = 64 # calls, and work on the memory models for this architecture # 256-16 MB - normal binaries start at 256 MB, and jumps are limited # to +/- 16 MB -KLIBCSHAREDFLAGS = -Ttext 0x0f000200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x0f000000 # The asm include files live in asm-powerpc KLIBCASMARCH = powerpc diff --git a/usr/klibc/arch/riscv64/MCONFIG b/usr/klibc/arch/riscv64/MCONFIG index 34f0774..6168150 100644 --- a/usr/klibc/arch/riscv64/MCONFIG +++ b/usr/klibc/arch/riscv64/MCONFIG @@ -17,4 +17,4 @@ endif KLIBCBITSIZE = 64 # Normal binaries start at 64 KB, so start the libary at 2 MB. -KLIBCSHAREDFLAGS =-Ttext 0x00200200 +KLIBCSHAREDFLAGS =-Ttext-segment 0x00200000 diff --git a/usr/klibc/arch/s390/MCONFIG b/usr/klibc/arch/s390/MCONFIG index 82d9a74..637f5aa 100644 --- a/usr/klibc/arch/s390/MCONFIG +++ b/usr/klibc/arch/s390/MCONFIG @@ -20,4 +20,4 @@ else endif KLIBCASMARCH = s390 -KLIBCSHAREDFLAGS = -Ttext 0x40000200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x40000000 diff --git a/usr/klibc/arch/sh/MCONFIG b/usr/klibc/arch/sh/MCONFIG index 665abb2..2facf7c 100644 --- a/usr/klibc/arch/sh/MCONFIG +++ b/usr/klibc/arch/sh/MCONFIG @@ -14,4 +14,4 @@ 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 0x00200200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x00200000 diff --git a/usr/klibc/arch/sparc/MCONFIG b/usr/klibc/arch/sparc/MCONFIG index 235ce60..0623fdc 100644 --- a/usr/klibc/arch/sparc/MCONFIG +++ b/usr/klibc/arch/sparc/MCONFIG @@ -16,4 +16,4 @@ 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 0x40000100 +KLIBCSHAREDFLAGS = -Ttext-segment 0x40000000 diff --git a/usr/klibc/arch/sparc64/MCONFIG b/usr/klibc/arch/sparc64/MCONFIG index bd6f004..c833985 100644 --- a/usr/klibc/arch/sparc64/MCONFIG +++ b/usr/klibc/arch/sparc64/MCONFIG @@ -18,4 +18,4 @@ KLIBCLDFLAGS = -m elf64_sparc # calls, and work on the memory models for this architecture # Normal binaries start at 1 MB; the linker wants 1 MB alignment, # and call instructions have a 30-bit signed offset, << 2. -KLIBCSHAREDFLAGS = -Ttext 0x80000200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x80000000