The glibc implementation of the loader passes argc/argv/envp
to all elf constructors. This change makes bionic linker
behave in the same way.
Bug: http://b/30145768
Change-Id: I1c65c42aa5305a5b133c64b5748205bbde869e0e
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
This change implements the following property:
Any 2**N aligned memory region on size 2**N contains no more than one DSO.
The value N can be configured, with 16 or 18 looking like a good choice.
Additionally, DSOs are loaded at random page-aligned address inside these large
regions.
This change has dual purpose:
1. Larger values of N allow a lot more compact CFI shadow implementation.
See change I14dfea630de468eb5620e7f55f92b1397ba06217.
For example, CFI shadow for the system_server process has the following size (RSS, KB):
152 for N = 12, 32 for N = 16, 16 for N = 18.
2. Extra randomization is good for security.
This change does not result in extra RAM usage, because everything is still page-aligned.
It does result in a bit more VM fragmentation because of the gaps between shared libraries.
As it turns out, this fragmentation is barely noticeable because the kernel creates new mapping
at the highest possible address, and we do enough small mappings to almost completely fill the
gaps (ex. in the Zygote the gaps are filled with .ttf file mappings and thread stacks).
I've measured VM fragmentation as the sum of all VM gaps (unmapped regions) that are larger
than 1MB according to /proc/$PID/maps. On aosp_angler-userdebug, the numbers are (in GB):
| N = 12 | N = 18
system_server | 521.9 | 521.1
zygote64 | 522.1 | 521.3
zygote32 | 2.55 | 2.55
mediaserver | 4.00 | 4.00
Change-Id: Ia6df840dd409c82837efd1f263be420d9723c84a
We have much better control over visibility now, so we don't need to
pollute the headers with cruft.
Bug: http://b/24767418
Change-Id: I349f4c3bc30102477375ad9f80926e560c7c1d8b
Move all of the uapi kernel headers that are only found in the android
kernel, and are still used by the tree into their own directory.
Delete all of these files that are not used.
Also, delete binder.h from the linux directory since it already exists
in the linux/android directory.
Bug: 30072483
Change-Id: I879f16e366f7670b8be3546b0a9cf9567fce6526
gnustl is using this. It would be easy to change gnustl to *not* use
it for Android, but we've had this in released NDKs for years now so
we probably need this anyway.
Change-Id: I398a550664bf4ccbd9ea54f53c65428293a599a4
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
1. Make sure that the .dynamic section offset and size matches
PT_DYNAMIC segment offset and filesz
2. No section offset can be 0
Bug: http://b/16548758
Bug: http://b/29637134
Change-Id: I11bc2567b0cff89f48699ec74015991fee5b137b
Test: Install and start the app from http://b/29637134
Previous patch changed pthread_cond_timedwait_relative_np to use
CLOCK_REALTIME, which causes app compatibility problem. So change
it back to CLOCK_MONOTONIC.
Bug: 30106240
Change-Id: I8e04058e92ede098f4f9f8d133f094001921441e
To avoid initialization ordering problem avoid constructing
non-trivial global objects for linker_logger.
This patch also adds explicit check for bloc_size_ on alloc
Change-Id: I2cb3b13a10b7fac1f52a20038af77266d3e1da96
This patch lets developers tune logging of dlopen/dlerror with
setting system property.
Note that for security purposes this option is disabled on user build
for non-debuggable apps.
For starters there are 3 debug options:
dlerror - enables logging of all dlerrors
dlopen - traces dlopen calls
To enable system-wide logging (works only for userdebug/eng builds)
use debug.ld.all property.
To enable logging for particular app use debug.ld.app.<appname> property.
Example: Running "adb shell setprop debug.ld.all dlerror,dlopen" will log all
dlerror message as well as trace all calls to dlopen.
Bug: http://b/29458203
Change-Id: I2392c80a795509e16fe5689d0500d18b99772a64
Soong is always on now, so we don't have to distinguish between
makefiles that should be ignored because Soong is handling them with an
Android.bp file, and makefiles that are still needed with Soong. All
obsolete Android.mk files have been removed, rename all Android.soong.mk
files to Android.mk.
Change-Id: Ic0494e1800dec13a9f5714559cffe3a5ebe49418
Change the references to using the android kernel source, to use
the linux stable source code repository.
Change-Id: Ibc6c90fc67c80bef235459bb3af31656f4d403ac
This option adds the ability to record all of the allocation requests
and dump them to a file when a signal is sent to the process.
Included in this change, redo the option processing to add a new
string option.
Bug: 27747898
Change-Id: Ida043362e38b5eb1d459c99db9c2581015dab366
The 2016f release of the tz code and data is available. It reflects the
following changes, which were either circulated on the tz mailing list
or are relatively minor technical or administrative changes:
Changes affecting future time stamps
The Egyptian government changed its mind on short notice, and
Africa/Cairo will not introduce DST starting 2016-07-07 after all.
(Thanks to Mina Samuel.)
Asia/Novosibirsk switches from +06 to +07 on 2016-07-24 at 02:00.
(Thanks to Stepan Golosunov.)
Changes to past and future time stamps
Asia/Novokuznetsk and Asia/Novosibirsk now use numeric time zone
abbreviations instead of invented ones.
Changes affecting past time stamps
Europe/Minsk's 1992-03-29 spring-forward transition was at 02:00
not 00:00.
(Thanks to Stepan Golosunov.)
Note: Paul Eggert changed the key used to sign the tzdata bundle and
the new public key cannot be found. The changes to the data since
2016e have been verified visually.
Change-Id: I11b49d9916e67313978fd893acf091e9f99f6d33
Test: Ran CTS/android.core.tests.libcore.package.harmony_java_util
Test: Ran CTS/android.core.tests.libcore.package.harmony_java_text
Test: Ran CTS/android.core.tests.libcore.package.libcore
Bug: 29991153