"bootstrap: true" modules are using bootstrap Bionic
If the bootstrap property is set to true, a binary configured to refer
to the bootstrap linker at /system/bin/bootstrap/linker[64]. This is for
very early processes that are executed before the init makes the linker
by bind-mounting it.
Bug: 120266448
Test: m init_second_stage and use readelf on the built file
DT_INTERP is set to /system/bin/bootstrap/linker64 and
Change-Id: I67487701192f127679cc8127ddc9f53e102ba9c4
diff --git a/cc/binary.go b/cc/binary.go
index 4c86371..d4edc1a 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -249,7 +249,11 @@
} else {
switch ctx.Os() {
case android.Android:
- flags.DynamicLinker = "/system/bin/linker"
+ if ctx.bootstrap() {
+ flags.DynamicLinker = "/system/bin/bootstrap/linker"
+ } else {
+ flags.DynamicLinker = "/system/bin/linker"
+ }
if flags.Toolchain.Is64Bit() {
flags.DynamicLinker += "64"
}