Use a linker script for host bionic embedded linker sections

Use an implicit linker script instead of flags in a file to specify
the locations of the host bionic embedded linker and to prevent it
from being stripped.

Test: build and run host bionic binary
Change-Id: I64e12118d33c67bab5e657cbc3ea8cde8f0fd7e6
This commit is contained in:
Colin Cross
2021-06-11 18:02:22 -07:00
parent cef792e467
commit 9cfe6119fe
5 changed files with 23 additions and 44 deletions

View File

@@ -92,7 +92,7 @@ cc_genrule {
}
cc_genrule {
name: "host_bionic_linker_flags",
name: "host_bionic_linker_script",
host_supported: true,
device_supported: false,
target: {
@@ -107,9 +107,9 @@ cc_genrule {
},
},
tools: ["extract_linker"],
cmd: "$(location) -f $(out) $(in)",
cmd: "$(location) -T $(out) $(in)",
srcs: [":linker"],
out: ["linker.flags"],
out: ["linker.script"],
}
// Instantiate the dex_bootjars singleton module.