Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1198)

Unified Diff: binutils/bfd/elf32-i386.c

Issue 3467009: [binutils] Prevent ld from rewriting tls access sequences with calls (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | binutils/bfd/elf64-x86-64.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/bfd/elf32-i386.c
diff --git a/binutils/bfd/elf32-i386.c b/binutils/bfd/elf32-i386.c
index d4bba6753daabbab71903c07ca9412ba059c7193..d22c99879c22bca113ae264973bfe4041b82690f 100644
--- a/binutils/bfd/elf32-i386.c
+++ b/binutils/bfd/elf32-i386.c
@@ -1322,6 +1322,14 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd,
if (from_type == to_type)
return TRUE;
+#ifdef ELF32_NACL_C
+ /* Don't attempt to rewrite code sequences with call in the middle,
+ because the NaCl assembler will put no-ops before the call,
+ which we can't handle yet. */
+ if (from_type == R_386_TLS_GD || from_type == R_386_TLS_LDM)
+ return TRUE;
+#endif
+
/* Check if the transition can be performed. */
if (check
&& ! elf_i386_check_tls_transition (abfd, sec, contents,
« no previous file with comments | « no previous file | binutils/bfd/elf64-x86-64.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698