aboutsummaryrefslogtreecommitdiff
path: root/src/liblink/data.c
AgeCommit message (Collapse)Author
2015-03-01all: delete C libraries and cmd/dist code that builds themRuss Cox
Change-Id: Ic66243674ac1dbf829c7523005e33611cc89ac83 Reviewed-on: https://go-review.googlesource.com/6362 Reviewed-by: Rob Pike <r@golang.org>
2015-02-26liblink: delete unused codeRuss Cox
Liblink is still needed for the linker (for a bit longer) but mostly not. Delete the unused parts. Change-Id: Ie63a7c1520dee52b17425b384943cd16262d36e3 Reviewed-on: https://go-review.googlesource.com/6110 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-02-03liblink: place DATA size in from3.offset alwaysRuss Cox
Like the TEXT/GLOBL flags, this was split between from.scale and reg, neither of which is appropriate. Change-Id: I2a16ef066a53b6edb7afb16cce108c0d1d26389c Reviewed-on: https://go-review.googlesource.com/3576 Reviewed-by: Aram Hăvărneanu <aram@mgk.ro> Reviewed-by: Austin Clements <austin@google.com>
2015-01-30cmd/gc, cmd/ld, liblink: update for portable Prog, Addr changesRuss Cox
Change-Id: Ia6f8badca56565b9df80c8dbe28c47f6cf7e653f Reviewed-on: https://go-review.googlesource.com/3515 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2014-10-14liblink: require DATA lines to be ordered by offset, with no overlapRuss Cox
The assembler could give a better error, but this one is good enough for now. Fixes #8880. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/153610043
2014-04-14liblink: remove arch-specific constants from file formatRuss Cox
The relocation and automatic variable types were using arch-specific numbers. Introduce portable enumerations instead. To the best of my knowledge, these are the only arch-specific bits left in the new object file format. Remove now, before Go 1.3, because file formats are forever. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/87670044
2014-01-21liblink: check for symgrow size too largeIan Lance Taylor
Many calls to symgrow pass a vlong value. Change the function to not implicitly truncate, and to instead give an error if the value is too large. R=golang-codereviews, gobot, rsc CC=golang-codereviews https://golang.org/cl/54010043
2013-12-09liblink: fix Plan 9 buildDavid du Colombier
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/39280043
2013-12-08liblink: create new library based on linker codeRuss Cox
There is an enormous amount of code moving around in this CL, but the code is the same, and it is invoked in the same ways. This CL is preparation for the new linker structure, not the new structure itself. The new library's definition is in include/link.h. The main change is the use of a Link structure to hold all the linker-relevant state, replacing the smattering of global variables. The Link structure should both make it clearer which state must be carried around and make it possible to parallelize more easily later. The main body of the linker has moved into the architecture-independent cmd/ld directory. That includes the list of known header types, so the distinction between Hplan9x32 and Hplan9x64 is removed (no other header type distinguished 32- and 64-bit formats), and code for unused formats such as ipaq kernels has been deleted. The code being deleted from 5l, 6l, and 8l reappears in liblink or in ld. Because multiple files are being merged in the liblink directory, it is not possible to show the diffs nicely in hg. The Prog and Addr structures have been unified into an architecture-independent form and moved to link.h, where they will be shared by all tools: the assemblers, the compilers, and the linkers. The unification makes it possible to write architecture-independent traversal of Prog lists, among other benefits. The Sym structures cannot be unified: they are too fundamentally different between the linker and the compilers. Instead, liblink defines an LSym - a linker Sym - to be used in the Prog and Addr structures, and the linker now refers exclusively to LSyms. The compilers will keep using their own syms but will fill out the corresponding LSyms in the Prog and Addr structures. Although code from 5l, 6l, and 8l is now in a single library, the code has been arranged so that only one architecture needs to be linked into a particular program: 5l will not contain the code needed for x86 instruction layout, for example. The object file writing code in liblink/obj.c is from cmd/gc/obj.c. Preparation for golang.org/s/go13linker work. This CL does not build by itself. It depends on 35740044 and will be submitted at the same time. R=iant CC=golang-dev https://golang.org/cl/35790044