platform_build_soong/cc
Dan Willemsen c77a0b3f9c Extract the linker and embed it into host bionic binaries
The linux kernel requires that the ELF interpreter (runtime linker)
that's referenced by PT_INTERP be either an absolute path, or a relative
path from the current working directory. We'd prefer a relative path
from the binary, similarly to how we handle looking up shared libraries,
but that's not supported.

Instead, extract the load sections from the runtime linker ELF binary
and embed them into each host bionic binary, omitting the PT_INTERP
declaration. The kernel will treat it as a static binary, and we'll use
a special entry point (linker_wrapper) to fix up the arguments passed by
the kernel before jumping to the embedded linker. From the linker's
point of view, it looks like the kernel loaded the linker like normal.

Bug: 31559095
Test: Enable host bionic,
      out/soong/host/linux_bionic-x86/nativetest64/libdemangle_test/libdemangle_test
Change-Id: I8d0aea9790b5e86fcc3ea6e2d00cfa33907e2853
2017-09-20 15:34:33 -07:00
..
config Fix ToolchainClangCflags for host bionic 2017-09-20 13:16:13 -07:00
androidmk.go Add cc_genrule 2017-09-18 23:33:25 -07:00
binary.go Extract the linker and embed it into host bionic binaries 2017-09-20 15:34:33 -07:00
builder.go Add support for Windows Message Compiler 2017-09-09 13:06:25 -07:00
cc.go Extract the linker and embed it into host bionic binaries 2017-09-20 15:34:33 -07:00
cc_test.go Dedup exported flags from dependencies 2017-05-17 14:22:22 -07:00
check.go Ban --coverage now that we have native coverage 2017-02-14 13:05:48 -08:00
cmakelists.go Run gofmt 2017-05-09 13:44:49 -07:00
compiler.go Refactor proto in preparation for java proto support 2017-09-11 12:41:58 -07:00
coverage.go Refactor factories 2017-06-30 21:08:36 +00:00
gen.go Refactor proto in preparation for java proto support 2017-09-11 12:41:58 -07:00
gen_stub_libs.py Add support for weak symbols in the NDK stubs. 2017-07-28 11:00:22 -07:00
genrule.go Add cc_genrule 2017-09-18 23:33:25 -07:00
installer.go Make binaries executable 2017-08-31 13:48:52 -07:00
kernel_headers.go Fix kernel_headers module registration 2017-07-10 12:30:35 -07:00
library.go Dump abi for vendor variants of VNDK libraries. 2017-09-11 17:36:46 -07:00
linker.go Don't add a rpath to the linker 2017-09-20 13:16:13 -07:00
llndk_library.go Add to cflags in compilerFlags() 2017-07-19 11:53:54 -07:00
lto.go Add support for thin LTO 2017-09-01 14:21:44 +08:00
makevars.go List of VNDK-related libs are exported to make 2017-08-10 14:15:39 +09:00
ndk_headers.go Make binaries executable 2017-08-31 13:48:52 -07:00
ndk_library.go Make binaries executable 2017-08-31 13:48:52 -07:00
ndk_prebuilt.go Refactor factories 2017-06-30 21:08:36 +00:00
ndk_sysroot.go Prettify soong ninja build descriptions 2017-05-10 11:04:16 -07:00
object.go Add prefix_symbols support to cc_object 2017-09-20 13:16:13 -07:00
prebuilt.go Make binaries executable 2017-08-31 13:48:52 -07:00
proto.go Refactor proto in preparation for java proto support 2017-09-11 12:41:58 -07:00
pylintrc Don't warn for TODOish comments. 2016-08-01 14:36:22 -07:00
relocation_packer.go Prettify soong ninja build descriptions 2017-05-10 11:04:16 -07:00
rs.go Prettify soong ninja build descriptions 2017-05-10 11:04:16 -07:00
sabi.go Dump abi for vendor variants of VNDK libraries. 2017-09-11 17:36:46 -07:00
sanitize.go Enhance coverage options to include those needed by Honggfuzz for coverage-driven fuzzing 2017-08-24 19:25:05 +00:00
stl.go Make libdl.so be loaded after libc.so 2017-08-23 12:54:54 +09:00
strip.go Separate cc.go 2016-07-29 15:17:58 -07:00
test.go Make test_suites arch_variant 2017-09-18 16:51:35 -07:00
test_data_test.go Add integration testing infrastructure 2017-07-14 14:19:51 -07:00
test_gen_stub_libs.py Add support for weak symbols in the NDK stubs. 2017-07-28 11:00:22 -07:00
tidy.go soong: add __clang_analyzer__ to clang-tidy 2017-05-04 01:19:02 +00:00
toolchain_library.go Refactor factories 2017-06-30 21:08:36 +00:00
util.go List of VNDK-related libs are exported to make 2017-08-10 14:15:39 +09:00
vndk.go Keep vndk library lists sorted 2017-08-17 14:57:12 -07:00