// CompilerInfo executes the specified gccgo compiler and returns // information about it: its version (e.g. "4.8.0"), its target triple // (e.g. "x86_64-unknown-linux-gnu"), and the list of directories it // searches to find standard packages. The given arguments are passed // directly to calls to the specified gccgo compiler. func CompilerInfo(gccgo string, args ...string) (version, triple string, dirs []string, err error) { … } // NewReader returns a reader for the export data section of an object // (.o) or archive (.a) file read from r. func NewReader(r io.Reader) (io.Reader, error) { … } // firstSection returns the contents of the first regular file in an ELF // archive (http://www.sco.com/developers/devspecs/gabi41.pdf, §7.2). func firstSection(a []byte) ([]byte, error) { … } // Read reads export data from in, decodes it, and returns type // information for the package. // The package name is specified by path. // // The FileSet parameter is currently unused but exists for symmetry // with gcexportdata. // // Read may inspect and add to the imports map to ensure that references // within the export data to other packages are consistent. The caller // must ensure that imports[path] does not exist, or exists but is // incomplete (see types.Package.Complete), and Read inserts the // resulting package into this map entry. // // On return, the state of the reader is undefined. func Read(in io.Reader, _ *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error) { … }