Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(989)

Unified Diff: src/cmd/ld/symtab.c

Issue 106380043: code review 106380043: cmd/go, cmd/ld, runtime, os/user: TLS emultion for android (Closed)
Patch Set: diff -r c7f38353757f https://code.google.com/p/go Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/ld/pobj.c ('k') | src/pkg/os/user/lookup_stubs.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/ld/symtab.c
===================================================================
--- a/src/cmd/ld/symtab.c
+++ b/src/cmd/ld/symtab.c
@@ -204,7 +204,12 @@
diag("missing section for %s", s->name);
errorexit();
}
- putelfsyment(putelfstr(s->name), 0, s->size, (STB_LOCAL<<4)|STT_TLS, s->sect->elfsect->shnum, 0);
+ if (strcmp(goos, "android") == 0) {
+ // Android emulates runtime.tlsg as a regular variable.
+ putelfsyment(putelfstr(s->name), 0, s->size, (STB_LOCAL<<4)|STT_OBJECT, s->sect->elfsect->shnum, 0);
+ } else {
+ putelfsyment(putelfstr(s->name), 0, s->size, (STB_LOCAL<<4)|STT_TLS, s->sect->elfsect->shnum, 0);
+ }
s->elfsym = numelfsym++;
}
« no previous file with comments | « src/cmd/ld/pobj.c ('k') | src/pkg/os/user/lookup_stubs.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b