Commit graph

9 commits

Author SHA1 Message Date
Elliott Hughes
4da99ffe5e Fix running tests/benchmarks on the host.
This was broken by all the mainline modules stuff. It's quite a bit
hairier to set up now, given that we don't have an apexd on the host.
An alternative might be to actually set up a fake /apex that points to
the bootstrap directories?

Test: ./benchmarks/run-on-host.sh 64
Test: ./tests/run-on-host.sh 64
Change-Id: If2c277ba492c7c443cdf51526ea42f56568e2ea6
2019-04-26 17:45:17 -07:00
Elliott Hughes
8ceb95c506 Fix running the tests on the host again.
Bug: N/A
Test: ran the tests on the host under glibc
Change-Id: Id05a896bdd11b231304ed1a08ef24e1a661ee20d
2019-03-26 14:47:08 -07:00
Jiyong Park
036e09c36e Don't install *.mountpoint targets
The *.mountpoint targets that installs /bionic/lib/lib*.so and
/bionic/bin/linker* are no longer needed.

Now, /system/lib/lib*.so and /system/bin/linker* are simply symlinks to
the corresponding files in the runtime apex. For example,

/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so

This is made possible because we now activate APEXes even before the
data partition is mounted. Before the data partition mounting, the
APEXes from the system partition are ativated. After the data partition
is mounted, updated APEXes in the partition (if any) are activated. As a
result, the symlink always points to the valid path regardless of
whether /data is mounted or not.

Bug: 125549215
Test: device boots
Change-Id: Ie7d83686abe00b3c436f9f9db75d4244200a0fc9
2019-03-14 07:35:52 +09:00
Jiyong Park
88d03200d4 Fix: symbols/bionic/lib64/libc.so is the wrong variant
The new module type bionic_mountpoint wasn't mutated by the sanitizer.
As a result, it has been taking non-sanitized symbol libraries even for
sanitized builds. Fixing the issue by making the module type to
implement the cc.Sanitizeable interface so that it can be mutated by the
sanitizer.

Bug: 124469750
Test: SANITIZE_TARGET=hwaddress m
Inspect Android-<target>.mk and check that LOCAL_SOONG_UNSTRIPPED_BINARY
for libc.mountpoint module is pointing to a hwasan variant of libc.so

Change-Id: I10c863c0dbd361463648a4b7d897a4f88a9c85cb
2019-02-15 12:15:27 +09:00
Jiyong Park
acb4d21a2a Symbols files under $(OUT)/symbols/bionic/
We need symbol files for /bionic/* paths.

New property "mountsource" is added to specify the "real" module that
the bionic mountpoint module is a mountpoint for. The real module
provides path to the unstripped elf file, which is installed to the
symbols/bionic/* path.

Bug: 123985838
Test: m libc.mountpoint libm.mountpoint libdl.mountpoint
linker.mountpoint
$(OUT)/symbols/bionic/bin/linker, bionic/lib[64]/lib{c|dl|m}.so exist

Change-Id: I43f074f0076b576f214fe92a98689a413efd3daa
2019-02-11 16:05:48 +09:00
Jiyong Park
a5f914aef1 Add bionic mount points under /bionic
This change adds following files and symlinks:

Files:
/bionic/lib[64]/lib{c|dl|m}.so
/bionic/bin/linker[64]

Symlinks:
/system/lib[64]/lib{c|dl|m}.so -> /bionic/lib[64]/lib{c|dl|m}.so
/system/bin/linker[64] -> /bionic/bin/linker[64]
/system/bin/linker_asan[64] -> /bionic/bin/linker[64]

The files serve as mount points for either the bootstrap Bionic or the
default Bionic from the runtime APEX. init does the bind-mounting during
booting.

The symlinks are there to not change the ordinary paths to the bionic
files; there are many places that the paths are implied or hard-coded,
e.g., dlopen("/system/lib/libc.so") or DT_INTERP pointing to
/system/bin/linker in the vendor prebuilts.

Bug: 120266448
Test: m blueline, cf_x86, aosp_arm
The aforementioned files and symlinks are found

Change-Id: I97e38c29409ac0610dde285db8df6e94a7930094
2019-01-31 13:44:20 +09:00
Colin Cross
2722ebb30b Convert bionic benchmarks and tests to Android.bp
The compile-time tests and a few custom libraries for dynamic linker
testing are still compiled in make.

Also converts the make rules to run tests on the host to shell scripts
in tests/run-on-host.sh and benchmarks/run-on-host.sh

Change-Id: I6f174b3a69d58c4ed74d29f4e79332d483681534
2016-07-14 12:30:12 -07:00
Dmitriy Ivanov
c7cbde320c Fix warning: overriding commands for target
Change-Id: I00fb4d6a8ff388722b75de9a0f4316619aaf9320
2014-12-03 09:51:37 -08:00
Dmitriy Ivanov
06b1b8ceac Extract bionic-prepare-run-on-host to inc file.
Make benchmark run-on-host depend on bionic-prepare-run-on-host.

Change-Id: I0bdbf561b2580d607a49b7c83cc273320ac55429
2014-12-02 15:15:34 -08:00