aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-03-07 00:07:11 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-03-07 00:07:11 +0000
commit5d2277df00aa4c3b197f1121d3fd041f3273bcaf (patch)
tree33a8905a8eb5af31c2ad9f95a2dd72f1ea1e4cdd /docs
parent0749ef5de444f1a4b8d014cc0113b10cb915ab6f (diff)
parent3977774a3ade74110e76c3cb594ad6762c946572 (diff)
downloadndk-5d2277df00aa4c3b197f1121d3fd041f3273bcaf.tar.gz
Merge "Hide unwinder symbols on all architectures."
Diffstat (limited to 'docs')
-rw-r--r--docs/BuildSystemMaintainers.md18
-rw-r--r--docs/changelogs/Changelog-r21.md3
2 files changed, 14 insertions, 7 deletions
diff --git a/docs/BuildSystemMaintainers.md b/docs/BuildSystemMaintainers.md
index 461b2528f..922d84405 100644
--- a/docs/BuildSystemMaintainers.md
+++ b/docs/BuildSystemMaintainers.md
@@ -410,10 +410,11 @@ preserved. By default, only symbols in used sections will be included in the
linked binary.
If this behavior is not desired for your build system, ensure that these flags
-are at least used for `libgcc_real.a` (`libgcc.a` is a linker script, and
-`--exclude-libs` does not have any effect on the contents of linker scripts) and
-`libunwind.a` (libunwind is only used for ARM32). This is necessary to avoid
-unwinding bugs on ARM32. See [Unwinding] for more information.
+are at least used for `libgcc.a` (`libgcc_real.a` on Arm32, where `libgcc.a` is
+a linker script, as `--exclude-libs` does not have any effect on the contents of
+linker scripts) and `libunwind.a` (libunwind is only used for ARM32). This is
+necessary to avoid unwinding bugs on Arm32. See [Unwinding] for more
+information.
[visibility]: https://gcc.gnu.org/wiki/Visibility
@@ -513,9 +514,12 @@ these symbols from a shared library. If this library was built with the wrong
unwinder, it is possible for one unwinder to call into the other. As they are
not compatible, this will likely result in either a crash or a failed unwind. To
avoid this problem, libraries should always be built with
-`-Wl,--exclude-libs,libgcc_real.a` and `-Wl,--exclude-libs,libunwind.a` (the
-latter is only necessary for 32-bit ARM) to ensure that unwind symbols are not
-re-exported from shared libraries.
+`-Wl,--exclude-libs,libgcc.a`, `-Wl,--exclude-libs,libgcc_real.a` and
+`-Wl,--exclude-libs,libunwind.a` (the latter is only necessary for 32-bit Arm)
+to ensure that unwind symbols are not re-exported from shared libraries. Note
+that `libgcc_real.a` is needed because on some architectures (currently only
+32-bit Arm) `libgcc.a` is a linker script and `--exclude-libs` does not extend
+to the contents of linker scripts.
Even with the above precautions, it is still possible for an improperly built
external dependency to provide an incorrect unwind implementation as described
diff --git a/docs/changelogs/Changelog-r21.md b/docs/changelogs/Changelog-r21.md
index 35a325c66..d41aced5b 100644
--- a/docs/changelogs/Changelog-r21.md
+++ b/docs/changelogs/Changelog-r21.md
@@ -61,6 +61,9 @@ For Android Studio issues, follow the docs on the [Android Studio site].
Pure C/C++ executables were fine, but this effectively broke all app
debugging. The error from gdb that confirms you were affected by this was
`gdb-8.3/gdb/psymtab.c:316: internal-error: sect_index_text not initialized`.
+ * [Issue 1166]: Rehid unwinder symbols all architectures.
+
+[Issue 1166]: https://github.com/android/ndk/issues/1166
## Changes