aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:11:41 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:13:52 -0700
commit51537393bd939e79f6e9291629fb65a17e6f19da (patch)
treee6b819c200346bc2a01540226ee74d36fffa3b17 /bfd/elfxx-x86.h
parente98fdf1ab07243fe467caadd0d033b44b8ca20c7 (diff)
downloadgdb-51537393bd939e79f6e9291629fb65a17e6f19da.zip
gdb-51537393bd939e79f6e9291629fb65a17e6f19da.tar.gz
gdb-51537393bd939e79f6e9291629fb65a17e6f19da.tar.bz2
x86: Add TLS_TRANSITION_IE_TO_LE_P
Add TLS_TRANSITION_IE_TO_LE_P which returns TRUE if TLS IE->LE transition is OK. * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New. * elf32-i386.c (elf_i386_tls_transition): Use it. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
Diffstat (limited to 'bfd/elfxx-x86.h')
-rw-r--r--bfd/elfxx-x86.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index 17aa10c..0525c9c 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -74,6 +74,13 @@
&& ((EH)->elf.root.u.def.section->owner->flags & DYNAMIC) != 0 \
&& ((EH)->elf.root.u.def.section->flags & SEC_CODE) == 0)
+/* TRUE if TLS IE->LE transition is OK. */
+#define TLS_TRANSITION_IE_TO_LE_P(INFO, H, TLS_TYPE) \
+ (bfd_link_executable (INFO) \
+ && (H) != NULL \
+ && (H)->dynindx == -1 \
+ && (TLS_TYPE & GOT_TLS_IE))
+
/* x86 ELF linker hash entry. */
struct elf_x86_link_hash_entry