Commit graph

26 commits

Author SHA1 Message Date
Elliott Hughes
8aa1deb96c Clarify what part of the NDK sets the soname.
It's the build systems, not the toolchain itself.

Bug: https://github.com/android/ndk/issues/1865
Test: treehugger
Change-Id: I74b35498e32c798683fd39e7369f87ff6cc2de38
2023-04-13 14:45:00 +00:00
Elliott Hughes
bb1cb03ad1 Link to the best relative relocations docs I know of.
Bug: https://github.com/android/ndk/discussions/1831
Test: N/A
Change-Id: Ida6d16a51f133ce3251db6ef8a25f4e1a8f2496e
2023-01-18 23:26:58 +00:00
Elliott Hughes
0427760a54 Docs: link to the unwinder docs.
Since (a) they're not a README.md and (b) they moved git project
recently, it's really hard to find these docs even if you know they
exist, which no-one does.

Test: N/A
Change-Id: Ic12e47ef5eb09e692ac0974b1d33bc5dc83d1028
2020-10-30 16:36:16 -07:00
Ryan Prichard
aff9a34bd8 Rename linker greylist to exempt-list
Update a comment in android-changes-for-ndk-developers.md about the
removed debug.ld.greylist_disabled system property.

Update language to comply with Android's inclusive language guidance

  #inclusivefixit

See https://source.android.com/setup/contribute/respectful-code for reference

Bug: http://b/162536543
Test: bionic-unit-tests
Change-Id: I760ee14bce14d9d799926c43d2c14fd8ffbc6968
2020-08-03 16:17:00 -07:00
Elliott Hughes
68ae6ad12e Changes for #inclusivefixit.
Test: treehugger
Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
2020-07-21 16:34:58 -07:00
Elliott Hughes
6663f5525d Modernize SHT_RELR support.
Until now we've only supported RELR with our own OS-private-use
constants. Add support for the official numbers (while maintaining
support for the historical numbers).

Add tests to ensure we continue to support both indefinitely.

We can't yet flip the build system over to using the official constants
because the old GNU binutils objcopy we still use in most cases (for the
mini-debug section) only supports the historical constants.

Bug: http://b/147452927
Test: treehugger
Change-Id: If214fce7fade4316115947e90b78ab40864b61f2
2020-01-24 15:39:01 -08:00
Elliott Hughes
8f3f191bf3 Link our two main developer-facing docs together.
Bug: http://b/139329827
Test: N/A
Change-Id: I38e05f1a7eaa8ff31b503541e34f2e362cd4722e
2019-08-15 08:19:49 -07:00
Elliott Hughes
3230b6851b Document the "one big library" trick.
Bug: http://b/133823482
Test: N/A
Change-Id: I3a70fe563f47d6f2311415c84a3c5f9f7b575e54
2019-08-05 16:40:52 -07:00
Elliott Hughes
8e4b6b695e [PATCH] Document the LD_PRELOAD workaround.
Bug: N/A
Test: N/A
Change-Id: Ifbc6eb3c7f77e3f2e5a29b505b982880d96c5ab0
2019-06-05 08:28:55 -07:00
Elliott Hughes
fb9ce2882b Document __register_atfork.
Bug: https://github.com/android-ndk/ndk/issues/964
Test: N/A
Change-Id: I5f3fa4c7fa42abde05f5b5fe730748d8c5fb4bb2
2019-04-22 08:57:36 -07:00
Elliott Hughes
3770d93263 docs: mention the fact that bionic now uses ifuncs.
Bug: http://b/123296740
Test: N/A
Change-Id: I2cdc575270ebf32fd8ac1de21182150f5222cf9f
2019-03-26 08:52:07 -07:00
Elliott Hughes
74866e160d Revert "Move android-changes-for-ndk-developers.md into docs/."
This reverts commit 1975196c87.

Reason for revert: https://android.googlesource.com/ doesn't follow symlinks :-(

Change-Id: I58038a03388ab5257d301debb494ce354013acfe
2018-08-06 15:40:04 +00:00
Elliott Hughes
1975196c87 Move android-changes-for-ndk-developers.md into docs/.
(But keep a symbolic link so we don't break the web.)

Bug: N/A
Test: N/A
Change-Id: Ib0c8ef80cb4b6836a465d897ffe6d78e11f09f46
2018-08-01 13:07:17 -07:00
Elliott Hughes
dc66073417 Document the historical dlopen issues.
Bug: https://groups.google.com/forum/#!topic/android-ndk/OJxg_550eHE
Test: N/A
Change-Id: Ife066dcd3af89952f81f0aefc33351c59b83be9b
2018-05-01 11:27:46 -07:00
Elliott Hughes
e61e0cda99 Document that dlclose with thread_local is fixed in P.
Bug: https://github.com/android-ndk/ndk/issues/360
Test: N/A
Change-Id: Ib9807045bd3206fa3cd300ab70ebed93c73a58e4
2018-01-19 10:33:41 -08:00
Elliott Hughes
c5f78240f3 Make it clear that "dlopen" logging includes "dlclose".
Bug: http://b/69921537
Test: N/A
Change-Id: I23d534bb92d5542dd952ff664ee34bb327c896cc
2017-12-05 09:23:51 -08:00
Elliott Hughes
bcbce9b453 Document the dlclose/thread locals with non-trivial destructors problem.
Bug: https://github.com/android-ndk/ndk/issues/360
Test: N/A
Change-Id: I964a6c9abd1ae65d74c6aee1c842b2f3d24b5556
2017-10-25 23:08:10 +00:00
Elliott Hughes
d6f91ce85f Document DT_RUNPATH support.
Bug: http://b/37328826
Test: N/A
Change-Id: Ia220f7f519e3cdd6193faff3b58d598505d4d0cf
2017-04-17 16:01:23 -07:00
Elliott Hughes
9e27e58faa Add support for disabling the greylist.
Useful for testing whether apps have actually stopped using greylisted
libraries even if they still have references to them in their apk to support
old Android releases but also haven't bumped their targetSdkVersion yet.

Since we already have two expensive __system_property_get calls and this
would add a third, optimize two (but leave the third since it's not
obviously amenable to optimization). None of this matters for user builds,
but I don't want userdebug/eng to have distractingly different performance.

(cherrypick of 7933bec2872aa1c3430149c7649726333c0ac9d8.)

Bug: http://b/36106661
Test: ran "can you escape 5" with and without this property
Change-Id: Id9a804695c1dca9b4be2ebd0e72f01817bb13cba
2017-04-06 10:59:24 -07:00
Elliott Hughes
9e3d527bd2 Describe our dynamic linker compatibility policy.
Bug: N/A
Test: N/A
Change-Id: I6f472d1ab22636de74fd103e9a480fb1ab51e314
2017-01-13 11:07:00 -08:00
Dimitry Ivanov
5d1753f7f5 Document bionic loader logging properties
Bug: http://b/29458203
Test: spellchecker in vim
Change-Id: I81e60a09fa256110d7ab9b530e7821ae66e8f020
2016-12-14 15:00:33 -08:00
Elliott Hughes
1777aafa20 Document more dynamic linker changes.
Based on https://plus.google.com/+ElliottHughes/posts/dtguP8BWkc7?sfc=false.

Bug: http://b/33001640
Change-Id: I9efedaf1c17a38d4426f030dd252446e4dfbc1cb
2016-11-18 14:57:38 -08:00
Dimitry Ivanov
12b918743d Relax ELF header checks - warn for apps targeting pre-O
Bug: http://b/32581440
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I2fe356c67eb9665c671758117679a29b207219e4
2016-11-16 18:43:06 -08:00
Elliott Hughes
4cc5a60f91 Downgrade W+E load segments to a warning unless targeting O.
I don't think we're getting any value from more dupes of the same dodgy
middleware, and I worry that we're hiding other, more subtle, compatibility
issues behind this one.

Test: bionic tests
Change-Id: I556cf36eac96c90976bae32621d1c133bbb8fcc7
2016-11-15 16:59:33 -08:00
Elliott Hughes
77e875713f Document a post-N dynamic linker change.
Test: N/A
Change-Id: I37f3ccccd81c29a4ffe400fc2177bbe082195ade
2016-10-07 15:59:58 -07:00
Elliott Hughes
c45380d20c Turn the recent blog post into markdown docs.
Originally http://android-developers.blogspot.com/2016/06/android-changes-for-ndk-developers.html

Test: N/A
Change-Id: I7ab75bcf9d518310fdf4e752929ba71c286fa242
2016-10-06 22:47:19 -07:00