aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-09-18 16:17:49 +0930
committerAlan Modra <amodra@gmail.com>2015-09-18 16:38:03 +0930
commit7c9cf4158452094f4c463676e5122c5c4ce64de8 (patch)
tree0ffa90631c601f42f7c88145c3faef48e8d6fdab /ld/ld.texinfo
parent975f8a9e3144e4d3d3f391e907c8bf94b23dc8b6 (diff)
downloadgdb-7c9cf4158452094f4c463676e5122c5c4ce64de8.zip
gdb-7c9cf4158452094f4c463676e5122c5c4ce64de8.tar.gz
gdb-7c9cf4158452094f4c463676e5122c5c4ce64de8.tar.bz2
Add PowerPC64 ld --tls-get-addr-optimize.
Sometimes it may be of benefit to force use of the __tls_get_addr_opt call stub even when the glibc being used during linking does not advertise __tls_get_addr_opt. bfd/ * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename from no_tls_get_addr_opt. * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt. (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at default of -1. ld/ * emultempl/ppc64elf.em (params): Init tls_get_addr_opt field to -1. (OPTION_TLS_GET_ADDR_OPT): Define. (PARSE_AND_LIST_LONGOPTS): Handle --tls-get-addr-opt. (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise. * ld.texinfo: Document --tls-get-addr-optimize and --no-tls-get-addr-optimize.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index be1d490..57f1730 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -7133,6 +7133,21 @@ PowerPC64 @command{ld} normally performs some optimization of code
sequences used to access Thread-Local Storage. Use this option to
disable the optimization.
+@cindex PowerPC64 __tls_get_addr optimization
+@kindex --tls-get-addr-optimize
+@kindex --no-tls-get-addr-optimize
+@item --tls-get-addr-optimize, --no-tls-get-addr-optimize
+These options control whether PowerPC64 @command{ld} uses a special
+stub to call __tls_get_addr. PowerPC64 glibc 2.22 and later support
+an optimization that allows the second and subsequent calls to
+@code{__tls_get_addr} for a given symbol to be resolved by the special
+stub without calling in to glibc. By default the linker enables this
+option when glibc advertises the availability of __tls_get_addr_opt.
+Forcing this option on when using an older glibc won't do much besides
+slow down your applications, but may be useful if linking an
+application against an older glibc with the expectation that it will
+normally be used on systems having a newer glibc.
+
@cindex PowerPC64 OPD optimization
@kindex --no-opd-optimize
@item --no-opd-optimize