All binaries and libraries are mapped rwx on both text and data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Android |
Fix Released
|
Low
|
Bernhard Rosenkraenzer |
Bug Description
$ readelf -l system/lib/libc.so | grep LOAD
LOAD 0x000000 0x00000000 0x00000000 0x4c6a4 0x57a54 RWE 0x8000
There's only one PT_LOAD sections in all binaries in both daily builds and local builds using the linaro toolchain.
Using the android toolchain from prebuilt/
Using a simple test case, it appears ld in the linaro toolchain doesn't like the linker script used by the android build system.
----8<-----
int foo = 42;
int bar() { return 42; }
----8<-----
$ prebuilt/
$ readelf -l test.so|grep LOAD
LOAD 0x000000 0x00000000 0x00000000 0x00298 0x00298 R E 0x1000
LOAD 0x001000 0x00001000 0x00001000 0x0003c 0x0003c RW 0x1000
$ android-
$ readelf -l test.so|grep LOAD
LOAD 0x000000 0x00000000 0x00000000 0x01068 0x01068 RWE 0x8000
However, using the default link script, there's no such problem:
$ android-
$ readelf -l test.so|grep LOAD
LOAD 0x000000 0x00000000 0x00000000 0x00234 0x00234 R E 0x8000
LOAD 0x000234 0x00008234 0x00008234 0x00068 0x00068 RW 0x8000
tags: | added: patch |
Changed in linaro-android: | |
importance: | Undecided → High |
assignee: | nobody → Bernhard Rosenkraenzer (berolinux) |
Changed in linaro-android: | |
status: | New → Confirmed |
milestone: | none → 11.10 |
tags: | added: linaro-mozilla |
Changed in linaro-android: | |
importance: | High → Medium |
Changed in linaro-android: | |
milestone: | 11.10 → 11.11 |
Changed in linaro-android: | |
milestone: | 11.11 → 11.12 |
Changed in linaro-android: | |
importance: | Medium → Low |
milestone: | 11.12 → 12.01 |
Using this patch, I'm getting the expected result on binaries and libraries.
These lines were taken from the default linker script.