platform_build_soong/cmd/host_bionic_inject
Dan Willemsen 10bf17cf45 Fix the host bionic linker check; add tests
Gold uses two PT_LOAD programs: RX, RW
LLD is using three PT_LOAD programs: R, RX, RW

All non-static host bionic executables are linked with LLD, as it's
required in order to embed the linker. The dynamic linker is considered
a static executable for this definition.

When the linker had been built with Gold, we inserted the the RX&RW
loads in the middle of the executable's readonly load, splitting the R
load into two. When this happened, all of the linker's loads existed 1:1
in the final executable.

Now that the linker is built with LLD, we're inserting the loads into
the same place, but LLD merges the first part of the executable's R load
with the linker's R load, so there's not a 1:1 matching.

So just make sure that all of the linker's loads are contained within
the executable's loads (and with the appropriate flags).

Test: m blueprint_tools (runs new tests)
Test: build host bionic binaries
Change-Id: If7868d2ab8980d27ba5ab8994fefe0d6142f215a
2018-11-12 22:29:44 -08:00
..
Android.bp Fix the host bionic linker check; add tests 2018-11-12 22:29:44 -08:00
host_bionic_inject.go Fix the host bionic linker check; add tests 2018-11-12 22:29:44 -08:00
host_bionic_inject_test.go Fix the host bionic linker check; add tests 2018-11-12 22:29:44 -08:00