]> Cypherpunks repositories - gostls13.git/commitdiff
liblink: fix error message on linux for unknown TLS base
authorRuss Cox <rsc@golang.org>
Thu, 29 Jan 2015 03:39:57 +0000 (22:39 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 30 Jan 2015 02:50:08 +0000 (02:50 +0000)
headstr(Hlinux) was reporting "android",
making for some confusing error messages.

Change-Id: I437095bee7cb2143aa37c91cf786f3a3581ae7b9
Reviewed-on: https://go-review.googlesource.com/3513
Reviewed-by: Austin Clements <austin@google.com>
src/liblink/sym.c

index 35b88f44a2267b80adb9743331929771c167b129..079f600aa9f48d57647747562fd1d5055d966fd7 100644 (file)
@@ -44,12 +44,12 @@ static struct {
        char *name;
        int val;
 } headers[] = {
-       {"android",     Hlinux},
        {"darwin",      Hdarwin},
        {"dragonfly",   Hdragonfly},
        {"elf",         Helf},
        {"freebsd",     Hfreebsd},
        {"linux",       Hlinux},
+       {"android",     Hlinux}, // must be after "linux" entry or else headstr(Hlinux) == "android"
        {"nacl",                Hnacl},
        {"netbsd",      Hnetbsd},
        {"openbsd",     Hopenbsd},