]> Cypherpunks repositories - gostls13.git/commit
eliminate the package global name space assumption in object files
authorRuss Cox <rsc@golang.org>
Sat, 23 Jan 2010 01:06:20 +0000 (17:06 -0800)
committerRuss Cox <rsc@golang.org>
Sat, 23 Jan 2010 01:06:20 +0000 (17:06 -0800)
commit758f2bc556b19a3b46798b28741bacc322b243f6
treed7b13240b0ba1b00553ca9ccbc0ea1e72948ad67
parent07d3e0dce46ce438c7b07949d0e1725d6860e40d
eliminate the package global name space assumption in object files

5g/6g/8g: add import statements to export metadata, mapping package path to package name.
recognize "" as the path of the package in export metadata.
use "" as the path of the package in object symbol names.

5c/6c/8c, 5a/6a/8a: rewrite leading . to "". so that ·Sin means Sin in this package.

5l/6l/8l: rewrite "" in symbol names as object files are read.

gotest: handle new symbol names.

gopack: handle new import lines in export metadata.

Collectively, these changes eliminate the assumption of a global
name space in the object file formats.  Higher level pieces such as
reflect and the computation of type hashes still depend on the
assumption; we're not done yet.

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/186263
37 files changed:
src/cmd/5g/ggen.c
src/cmd/5g/gobj.c
src/cmd/5g/gsubr.c
src/cmd/5l/l.h
src/cmd/5l/obj.c
src/cmd/6g/ggen.c
src/cmd/6g/gobj.c
src/cmd/6g/gsubr.c
src/cmd/6g/reg.c
src/cmd/6l/obj.c
src/cmd/8g/ggen.c
src/cmd/8g/gobj.c
src/cmd/8g/gsubr.c
src/cmd/8g/reg.c
src/cmd/8l/obj.c
src/cmd/cc/lex.c
src/cmd/cc/lexbody
src/cmd/gc/align.c
src/cmd/gc/builtin.c.boot
src/cmd/gc/dcl.c
src/cmd/gc/export.c
src/cmd/gc/gen.c
src/cmd/gc/go.h
src/cmd/gc/go.y
src/cmd/gc/init.c
src/cmd/gc/lex.c
src/cmd/gc/obj.c
src/cmd/gc/reflect.c
src/cmd/gc/subr.c
src/cmd/gc/typecheck.c
src/cmd/gc/unsafe.c
src/cmd/gopack/ar.c
src/cmd/gotest/gotest
src/cmd/ld/go.c
src/cmd/ld/lib.c
src/cmd/ld/lib.h
src/pkg/debug/gosym/pclntab_test.go