]> Cypherpunks repositories - gostls13.git/commitdiff
doc: update out-of-date comments about runtime/cgo
authorShenghou Ma <minux.ma@gmail.com>
Thu, 19 Jan 2012 22:13:33 +0000 (17:13 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 19 Jan 2012 22:13:33 +0000 (17:13 -0500)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5532100

src/cmd/6l/obj.c
src/cmd/8l/obj.c
src/make.bash
src/pkg/runtime/cgo/gcc_darwin_386.c
src/pkg/runtime/cgo/gcc_darwin_amd64.c
src/pkg/runtime/mkasmh.sh
src/pkg/runtime/runtime.h
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s

index a1f9e2d111726a77c567a400e1a475027208e946..d258f05c9cea3056de5e129f8e10a425787d0f9f 100644 (file)
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
        case Hdarwin:   /* apple MACH */
                /*
                 * OS X system constant - offset from 0(GS) to our TLS.
-                * Explained in ../../libcgo/darwin_amd64.c.
+                * Explained in ../../pkg/runtime/cgo/gcc_darwin_amd64.c.
                 */
                tlsoffset = 0x8a0;
                machoinit();
@@ -209,8 +209,8 @@ main(int argc, char *argv[])
                /*
                 * ELF uses TLS offset negative from FS.
                 * Translate 0(FS) and 8(FS) into -16(FS) and -8(FS).
-                * Also known to ../../pkg/runtime/linux/amd64/sys.s
-                * and ../../libcgo/linux_amd64.s.
+                * Also known to ../../pkg/runtime/sys_linux_amd64.s
+                * and ../../pkg/runtime/cgo/gcc_linux_amd64.c.
                 */
                tlsoffset = -16;
                elfinit();
index 99726ec1800534b2c7b3062bf54cae6b9f1c5459..1d0f1ec0fce070bbf5cbe76a17f5fb0089532e2b 100644 (file)
@@ -218,7 +218,7 @@ main(int argc, char *argv[])
        case Hdarwin:   /* apple MACH */
                /*
                 * OS X system constant - offset from %gs to our TLS.
-                * Explained in ../../libcgo/darwin_386.c.
+                * Explained in ../../pkg/runtime/cgo/gcc_darwin_386.c.
                 */
                tlsoffset = 0x468;
                machoinit();
@@ -237,8 +237,8 @@ main(int argc, char *argv[])
                /*
                 * ELF uses TLS offsets negative from %gs.
                 * Translate 0(GS) and 4(GS) into -8(GS) and -4(GS).
-                * Also known to ../../pkg/runtime/linux/386/sys.s
-                * and ../../libcgo/linux_386.c.
+                * Also known to ../../pkg/runtime/sys_linux_386.s
+                * and ../../pkg/runtime/cgo/gcc_linux_386.c.
                 */
                tlsoffset = -8;
                elfinit();
index becf86d8517a4c2f962dff4b5e413d24e284dc35..3878d263f2ac33d61846b4366a5e42976cab72b1 100755 (executable)
@@ -75,7 +75,7 @@ $USE_GO_TOOL ||
 ) || exit 1
 bash "$GOROOT"/src/clean.bash
 
-# pkg builds libcgo and the Go programs in cmd.
+# pkg builds runtime/cgo and the Go programs in cmd.
 for i in lib9 libbio libmach cmd
 do
        echo; echo; echo %%%% making $i %%%%; echo
index dfeb9e11f6743c340be4afd9a6ce805e8f30b39b..d9f25347a50ea13519f79c825570009c3ef850ff 100644 (file)
@@ -39,8 +39,8 @@ inittls(void)
         *
         * The linker and runtime hard-code these constant offsets
         * from %gs where we expect to find m and g.
-        * Known to ../cmd/8l/obj.c:/468
-        * and to ../pkg/runtime/darwin/386/sys.s:/468
+        * Known to ../../../cmd/8l/obj.c:/468
+        * and to ../sys_darwin_386.s:/468
         *
         * This is truly disgusting and a bit fragile, but taking care
         * of it here protects the rest of the system from damage.
index 46546f1457749b827822bcbb7d4f070487cd351e..a0b026ee2bf680f24fee5b5d098c85d86b2a5813 100644 (file)
@@ -27,8 +27,8 @@ inittls(void)
         *
         * The linker and runtime hard-code these constant offsets
         * from %gs where we expect to find m and g.
-        * Known to ../cmd/6l/obj.c:/8a0
-        * and to ../pkg/runtime/darwin/amd64/sys.s:/8a0
+        * Known to ../../../cmd/6l/obj.c:/8a0
+        * and to ../sys_darwin_amd64.s:/8a0
         *
         * As disgusting as on the 386; same justification.
         */
index bc6b31ccc51e2b057b7cf005d1a4539f63b73881..ba48d0a137a2940d04c3681392120d610092bc37 100755 (executable)
@@ -34,8 +34,8 @@ case "$GOARCH" in
 386)
        # The offsets 0 and 4 are also known to:
        #       ../../cmd/8l/pass.c:/D_GS
-       #       ../../libcgo/linux_386.c:/^threadentry
-       #       ../../libcgo/darwin_386.c:/^threadentry
+       #       cgo/gcc_linux_386.c:/^threadentry
+       #       cgo/gcc_darwin_386.c:/^threadentry
        case "$GOOS" in
        windows)
                echo '#define   get_tls(r)      MOVL 0x14(FS), r'
@@ -89,8 +89,8 @@ amd64)
        *)
                # The offsets 0 and 8 are known to:
                #       ../../cmd/6l/pass.c:/D_GS
-               #       ../../libcgo/linux_amd64.c:/^threadentry
-               #       ../../libcgo/darwin_amd64.c:/^threadentry
+               #       cgo/gcc_linux_amd64.c:/^threadentry
+               #       cgo/gcc_darwin_amd64.c:/^threadentry
                #
                echo '#define   get_tls(r)'
                echo '#define   g(r) 0(GS)'
index 7f1cb59eb512e0630c18a9b55db82f04c3266fb0..dc54285c72a422ed5af62a090697e2f59229bfa0 100644 (file)
@@ -168,8 +168,8 @@ struct      Gobuf
 };
 struct G
 {
-       byte*   stackguard;     // cannot move - also known to linker, libmach, libcgo
-       byte*   stackbase;      // cannot move - also known to libmach, libcgo
+       byte*   stackguard;     // cannot move - also known to linker, libmach, runtime/cgo
+       byte*   stackbase;      // cannot move - also known to libmach, runtime/cgo
        Defer*  defer;
        Panic*  panic;
        Gobuf   sched;
index b358509b191fe44218e63fb8d35960088e47406b..24eac766aac8d01082aacead41d4df72b9e4deb0 100644 (file)
@@ -338,7 +338,7 @@ TEXT runtime·setldt(SB),7,$32
         * To accommodate that rewrite, we translate the
         * address and limit here so that 0x468(GS) maps to 0(address).
         *
-        * See ../../../../libcgo/darwin_386.c for the derivation
+        * See cgo/gcc_darwin_386.c:/468 for the derivation
         * of the constant.
         */
        SUBL    $0x468, BX
index 095ba2fa53257abb5af7a3776baa75278c4e65f7..9d2ecbe2a544ec18776c39a14a0c4d0ec7cccc71 100644 (file)
@@ -327,8 +327,8 @@ TEXT runtime·mach_semaphore_signal_all(SB),7,$0
 // set tls base to DI
 TEXT runtime·settls(SB),7,$32
        /*
-       * Same as in ../386/sys.s:/ugliness, different constant.
-       * See ../../../../libcgo/darwin_amd64.c for the derivation
+       * Same as in sys_darwin_386.s:/ugliness, different constant.
+       * See cgo/gcc_darwin_amd64.c for the derivation
        * of the constant.
        */
        SUBQ $0x8a0, DI