diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2019-01-06 03:19:51 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-01-06 19:30:47 +0000 |
commit | 31f0d5525f39cd9427b6bac904f847178bb4d266 (patch) | |
tree | 3fc63ad172f53b3d1a8c005c319bab34c9f122e0 | |
parent | 7b49d9729ff6b3118c57eb6fe52c4f186016cfa0 (diff) | |
download | klibc-31f0d5525f39cd9427b6bac904f847178bb4d266.tar.gz |
[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@decadent.org.uk>
-rw-r--r-- | usr/klibc/arch/i386/MCONFIG | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/klibc/arch/i386/MCONFIG b/usr/klibc/arch/i386/MCONFIG index 1150ecedf79983..bfec004a3c8bf3 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 |