go/src/cmd/link
Cherry Zhang bbae923d20 cmd: merge branch 'dev.link' into master
In the dev.link branch we implemented the new object file format
and (part of) the linker improvements described in
https://golang.org/s/better-linker

The new object file is index-based and provides random access.
The linker maps the object files into read-only memory, and
access symbols on-demand using indices, as opposed to reading
all object files sequentially into the heap with the old format.

The linker carries symbol informations using indices (as opposed
to Symbol data structure). Symbols are created after the
reachability analysis, and only created for reachable symbols.
This reduces the linker's memory usage.

Linking cmd/compile, it creates ~25% fewer Symbols, and reduces
memory usage (inuse_space) by ~15%. (More results from Than.)

Currently, both the old and new object file formats are supported.
The old format is used by default. The new format can be turned
on by using the compiler/assembler/linker's -newobj flag. Note
that the flag needs to be specified consistently to all
compilations, i.e.

go build -gcflags=all=-newobj -asmflags=all=-newobj -ldflags=-newobj

Change-Id: Ia0e35306b5b9b5b19fdc7fa7c602d4ce36fa6abd
2019-11-05 14:57:48 -05:00
..
internal cmd: merge branch 'dev.link' into master 2019-11-05 14:57:48 -05:00
testdata cmd/link/internal/ld: copy Mach-O platform version commands to go.o 2019-03-21 08:41:51 +00:00
doc.go
dwarf_test.go debug/elf: apply more relocations when reading DWARF data sections 2019-09-17 18:46:32 +00:00
elf_test.go cmd/link: require cgo support for TestSectionsWithSameName 2019-04-19 17:03:55 +00:00
link_test.go [dev.link] cmd/link: restore -strictdups flag in newobj mode 2019-11-03 20:19:00 +00:00
linkbig_test.go cmd/link: add missing error check in test 2019-03-02 05:00:48 +00:00
main.go all: remove nacl (part 3, more amd64p32) 2019-10-10 22:38:38 +00:00