| | cmd/ld, liblink, pkg/net, pkg/os, pkg/runtime: add support for cgo enabled Android binaries. Android is too similar to Linux to warrant a separate GOOS at this point. Instead, this CL introduces the "android" tag in the standard library to compensate for the differences: - os.TempDir defaults to /data/local/tmp/ instead of /tmp (pkg/os) - getaddrinfo only supports AI_CANONNAME (pkg/net) - TLS emulation (pkg/runtime) To support the TLS emulation implemented by pkg/runtime/asm_tls_android_arm.s and pkg/runtime/cgo/gcc_android.c, the -H android option has been added to cmd/ld. -H android is similar to -H linux with the addition that runtime.tlsgm is turned into a regular variable and that TLS relocations are turned into regular address relocations. misc/cgo/android contains a small test program using an Android specific library through cgo. Total comments: 2 | Unified diffs | Side-by-side diffs | Delta from patch set | Stats (+289 lines, -52 lines) | Patch |  | A | misc/cgo/android/README | View | 1 2 | 1 chunk | +13 lines, -0 lines | 0 comments | Download |  | A | misc/cgo/android/test.go | View | 1 2 | 1 chunk | +15 lines, -0 lines | 0 comments | Download |  | M | src/cmd/ld/data.c | View | 1 | 1 chunk | +5 lines, -0 lines | 0 comments | Download |  | M | src/cmd/ld/doc.go | View | 1 | 1 chunk | +2 lines, -0 lines | 0 comments | Download |  | M | src/cmd/ld/elf.c | View | 1 | 1 chunk | +3 lines, -1 line | 0 comments | Download |  | M | src/cmd/ld/lib.h | View | 1 | 1 chunk | +2 lines, -0 lines | 0 comments | Download |  | M | src/cmd/ld/pobj.c | View | 1 | 1 chunk | +7 lines, -0 lines | 0 comments | Download |  | M | src/cmd/ld/symtab.c | View | 1 | 1 chunk | +5 lines, -1 line | 0 comments | Download |  | M | src/liblink/sym.c | View | 1 | 1 chunk | +1 line, -0 lines | 0 comments | Download |  | A | src/pkg/net/cgo_android.go | View | 1 | 1 chunk | +16 lines, -0 lines | 0 comments | Download |  | M | src/pkg/net/cgo_linux.go | View | 1 | 1 chunk | +1 line, -1 line | 0 comments | Download |  | M | src/pkg/os/file_unix.go | View | 1 | 1 chunk | +0 lines, -9 lines | 0 comments | Download |  | A | src/pkg/os/tmpdir_android.go | View | 1 | 1 chunk | +16 lines, -0 lines | 0 comments | Download |  | A | src/pkg/os/tmpdir_unix.go | View | 1 | 1 chunk | +16 lines, -0 lines | 1 comment | Download |  | M | src/pkg/os/user/lookup_stubs.go | View | 1 | 1 chunk | +1 line, -1 line | 0 comments | Download |  | M | src/pkg/os/user/lookup_unix.go | View | 1 | 1 chunk | +1 line, -1 line | 1 comment | Download |  | M | src/pkg/runtime/asm_arm.s | View | 1 | 2 chunks | +7 lines, -37 lines | 0 comments | Download |  | A | src/pkg/runtime/asm_tls_android_arm.s | View | 1 | 1 chunk | +35 lines, -0 lines | 0 comments | Download |  | A | src/pkg/runtime/asm_tls_arm.s | View | 1 | 1 chunk | +47 lines, -0 lines | 0 comments | Download |  | M | src/pkg/runtime/cgo/cgo.go | View | 1 | 1 chunk | +1 line, -1 line | 0 comments | Download |  | A | src/pkg/runtime/cgo/cgo_android.c | View | 1 | 1 chunk | +13 lines, -0 lines | 0 comments | Download |  | A | src/pkg/runtime/cgo/gcc_android.c | View | 1 | 1 chunk | +81 lines, -0 lines | 0 comments | Download |  | M | src/pkg/runtime/runtime.c | View | 1 | 1 chunk | +1 line, -0 lines | 0 comments | Download | Total messages: 5 |