klibc-bot for Ben Hutchings
2019-Jan-18 16:42 UTC
[klibc] [klibc:master] i386: Use -Ttext-segment to avoid address collision
Commit-ID: 34163a2c7d1c3b841a35b242dbdbda25c4fb1ecb Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=34163a2c7d1c3b841a35b242dbdbda25c4fb1ecb Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Sun, 6 Jan 2019 03:19:51 +0000 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 18 Jan 2019 03:10:14 +0000 [klibc] i386: Use -Ttext-segment to avoid address collision Building klibc for i386 with binutils 2.31 adds an extra .note.gnu.property section to klibc.so, the address of which is not affected by the -Ttext option. Loading a klibc executable then fails with the following kernel log message: 9409 (sh.shared): Uhuuh, elf segment at 0000000000600000 requested but the memory is mapped already I don't exactly see why this is happening, but it is triggered by the new section and the collision can be avoided by passing -Ttext-segment instead of -Ttext, similarly to x86_64. Link: https://www.zytor.com/pipermail/klibc/2019-January/004027.html Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/klibc/arch/i386/MCONFIG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/klibc/arch/i386/MCONFIG b/usr/klibc/arch/i386/MCONFIG index 1150ece..bfec004 100644 --- a/usr/klibc/arch/i386/MCONFIG +++ b/usr/klibc/arch/i386/MCONFIG @@ -30,7 +30,7 @@ KLIBCBITSIZE = 32 # This address needs to be reachable using normal inter-module # calls, and work on the memory models for this architecture # 96 MB - normal binaries start at 128 MB -KLIBCSHAREDFLAGS = -Ttext 0x06000200 +KLIBCSHAREDFLAGS = -Ttext-segment 0x06000000 # Asm includes for i386 are in the merged x86 tree KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/x86/include
Possibly Parallel Threads
- [klibc:master] x86_64: Use -Ttext-segment to avoid address collision
- x86_64: Use -Ttext-segment to avoid address collision
- [klibc:master] Use -Ttext-segment to link shared library on all arches
- [klibc:master] Kbuild: Remove KLIBCKERNELOBJ variable
- [PATCH] Update header locations for uapi & generated