summaryrefslogtreecommitdiff
path: root/src/cmd/ld/go.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý1-0/+869
2011-09-13Imported Upstream version 60Ondřej Surý1-710/+0
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-2/+4
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-2/+12
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-7/+6
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-0/+33
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý1-2/+0
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-68/+114
2010-06-29ld: fix implementation of -uRuss Cox1-10/+21
R=r CC=golang-dev http://codereview.appspot.com/1678046
2010-06-21ld: add -u flag to check safe bits; discard old -u, -x flagsRuss Cox1-1/+28
R=r, r2 CC=golang-dev http://codereview.appspot.com/1707043
2010-03-23Add support for #pragma dynexport.Ian Lance Taylor1-5/+82
R=rsc CC=golang-dev http://codereview.appspot.com/661043
2010-03-22Rename dynld to dynimport throughout.Ian Lance Taylor1-12/+12
Cgo users will need to rerun cgo. R=rsc CC=golang-dev http://codereview.appspot.com/692041
2010-01-25ld: typoRuss Cox1-1/+1
R=ken2 CC=golang-dev http://codereview.appspot.com/194073
2010-01-25eliminate package global name spaceRuss Cox1-4/+11
R=ken2 CC=golang-dev http://codereview.appspot.com/194071
2010-01-22eliminate the package global name space assumption in object filesRuss Cox1-38/+51
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 http://codereview.appspot.com/186263 Committer: Russ Cox <rsc@golang.org>
2010-01-19cleanup toward eliminating package global name spaceRuss Cox1-14/+14
* switch to real dot (.) instead of center dot (·) everywhere in object files. before it was half and half depending on where in the name it appeared. * in 6c/6a/etc identifiers, · can still be used but turns into . immediately. * in export metadata, replace package identifiers with quoted strings (still package names, not paths). R=ken2, r CC=golang-dev http://codereview.appspot.com/190076
2009-12-17 first stub for softfloats, intercepts float instructions and skipsKai Backman1-2/+1
them in the stream. R=rsc http://codereview.appspot.com/174052
2009-11-12cc, ld: fix more gcc 4.3 -O2 compile bugsRuss Cox1-2/+2
same as http://codereview.appspot.com/152088 in more files. Fixes issue 83. R=r, r1 http://codereview.appspot.com/152091
2009-10-15rename sys functions to runtime,Russ Cox1-14/+14
because they are in package runtime. another step to enforcing package boundaries. R=r DELTA=732 (114 added, 93 deleted, 525 changed) OCL=35811 CL=35824
2009-10-07factor portable object+library bits out of 5l/6l/8l into ldRuss Cox1-0/+3
R=r DELTA=3214 (904 added, 2260 deleted, 50 changed) OCL=35425 CL=35427
2009-08-30fix line numbers, again.Russ Cox1-25/+0
if first function in file was dead code, it was being discarded along with the file name information for that file. leave the functions in the master function list longer: let xfol take the dead code out of the code list, and let span skip the unreachable functions during output. before throw: sys·mapaccess1: key not in map panic PC=0x2e7b20 throw+0x33 /Users/rsc/go/src/pkg/runtime/runtime.c:65 throw(0x5834f, 0x0) sys·mapaccess1+0x73 /Users/rsc/go/src/pkg/runtime/hashmap.c:769 sys·mapaccess1(0x2b9bd0, 0x0) gob·*Encoder·Encode+0x16b /Users/rsc/go/src/pkg/fmt/print.go:2926 gob·*Encoder·Encode(0x2bb440, 0x0, 0x558b0, 0x0, 0x2e4be0, ...) main·walk+0x331 :1603 main·walk(0x33a480, 0x0) main·walk+0x271 :1596 main·walk(0x300640, 0x0) main·walk+0x271 :1596 main·walk(0x300520, 0x0) main·walk+0x271 :1596 main·walk(0x300240, 0x0) main·walk+0x271 :1596 main·walk(0x678f8, 0x0) main·main+0x22 :1610 main·main() after throw: sys·mapaccess1: key not in map panic PC=0x2e7b20 throw+0x33 /Users/rsc/go/src/pkg/runtime/runtime.c:65 throw(0x5834f, 0x0) sys·mapaccess1+0x73 /Users/rsc/go/src/pkg/runtime/hashmap.c:769 sys·mapaccess1(0x2b9bd0, 0x0) gob·*Encoder·Encode+0x16b /Users/rsc/go/src/pkg/gob/encoder.go:319 gob·*Encoder·Encode(0x2bb3c0, 0x0, 0x558b0, 0x0, 0x2e4be0, ...) main·walk+0x331 /Users/rsc/dir.go:121 main·walk(0x2f6ab0, 0x0) main·walk+0x271 /Users/rsc/dir.go:114 main·walk(0x301640, 0x0) main·walk+0x271 /Users/rsc/dir.go:114 main·walk(0x301520, 0x0) main·walk+0x271 /Users/rsc/dir.go:114 main·walk(0x301240, 0x0) main·walk+0x271 /Users/rsc/dir.go:114 main·walk(0x678f8, 0x0) main·main+0x22 /Users/rsc/dir.go:128 main·main() mainstart+0xe /Users/rsc/go/src/pkg/runtime/amd64/asm.s:55 mainstart() goexit /Users/rsc/go/src/pkg/runtime/proc.c:133 goexit() R=r DELTA=46 (20 added, 25 deleted, 1 changed) OCL=34094 CL=34103
2009-08-24ffi -> dynld.Russ Cox1-51/+81
move out of export data into its own section R=r DELTA=222 (71 added, 99 deleted, 52 changed) OCL=33801 CL=33808
2009-08-24first attempt at real FFI support.Russ Cox1-4/+2
in a .6 file, an export line //ffi T localfib remotefib remote.so means the dynamic linker should initialize localfib, always a pointer, to the address of remotefib, either text (T) or data (D) after loading remote.so. the C compiler will generate an export section when given the pragmas #pragma package fib #pragma ffi T localfib remotefib remote.so needing #pragma package is a bit of a kludge and hopefully could go away later. this is just the 6 tool chain support. other architectures will happen once 6 settles down. code using this to do FFI is in a later CL. R=r DELTA=161 (141 added, 14 deleted, 6 changed) OCL=33783 CL=33795
2009-08-24linker workRuss Cox1-2/+41
* use //ffi comments in package import data to generate relocation entries and library loads. * call initffi in rt0.s if present R=r DELTA=117 (91 added, 3 deleted, 23 changed) OCL=33739 CL=33750
2009-08-21linker workRuss Cox1-0/+2
* remove now-unused D_SBIG (was for typestrings) * rename elf64.[ch] to elf.[ch] * pull in elf headers from FreeBSD instead of writing our own * emit non-header ELF data in data section * stub out a few more ELF sections needed for dynamic loading R=r DELTA=1928 (1237 added, 635 deleted, 56 changed) OCL=33642 CL=33658
2009-08-20symbol bugs.Russ Cox1-0/+4
do not emit unreachable data symbols. R=austin DELTA=103 (71 added, 4 deleted, 28 changed) OCL=33325 CL=33622
2009-08-13debugging symbols for 8g.Russ Cox1-24/+0
backtraces don't work, but they didn't work when i started either. R=ken OCL=33230 CL=33230
2009-08-136g/6l: add go type information to symbol table.Russ Cox1-0/+2
archive size +70% binary size +30% old wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt} -rwxr-xr-x 1 rsc eng 1487922 Aug 13 13:21 /Users/rsc/bin/godoc -rwxr-xr-x 1 rsc eng 995995 Aug 13 13:21 /Users/rsc/bin/gofmt wreck.mtv=; du -sh $GOROOT/pkg/ 9.5M /home/rsc/go/pkg/ wreck.mtv=; new wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt} -rwxr-xr-x 1 rsc eng 2014390 Aug 13 14:25 /Users/rsc/bin/godoc -rwxr-xr-x 1 rsc eng 1268705 Aug 13 14:25 /Users/rsc/bin/gofmt wreck.mtv=; du -sh $GOROOT/pkg 16M /home/rsc/go/pkg wreck.mtv=; R=ken OCL=33217 CL=33220
2009-08-12change gotype in symbol table fromRuss Cox1-1/+4
character string to machine address. not filled in, just carved out. R=austin DELTA=77 (11 added, 34 deleted, 32 changed) OCL=33122 CL=33124
2009-07-14dead codeRuss Cox1-20/+0
R=r DELTA=20 (0 added, 20 deleted, 0 changed) OCL=31584 CL=31598
2009-07-07the ld-supplied typestrings are now obsoleteRuss Cox1-155/+0
R=r DELTA=167 (0 added, 167 deleted, 0 changed) OCL=31304 CL=31316
2009-07-07bug167Russ Cox1-1/+1
R=ken OCL=31295 CL=31295
2009-06-29allow forward declaration of struct in another fileRuss Cox1-35/+39
(in the same package). allow forward method declaration to be satisfied by implementation in another file (in the same package). all methods must be declared in the same file as the receiver type. R=ken OCL=30864 CL=30869
2009-06-05restructure makefiles, scripts to factor out O= logic.Russ Cox1-10/+10
remove a few hardcoded paths elsewhere too. R=r,gri DELTA=123 (44 added, 15 deleted, 64 changed) OCL=29914 CL=29945
2009-06-04dangling pointer bug (thanks valgrind)Russ Cox1-1/+1
R=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=29881 CL=29885
2009-06-028l fixes, cut and paste from 6l.Russ Cox1-1/+0
move PtrSize value into 6l/8l files. R=r DELTA=78 (47 added, 15 deleted, 16 changed) OCL=29729 CL=29798
2009-05-056l: eliminate dead code, not just the symbolsRuss Cox1-1/+21
editing the firstp list was ineffective, because follow rebuilds it from the textp list. the symbols for dead code were being dropped from the binary but the code was all still there. text for fmt.Printf("hello, world\n") drops from 143945 to 128650. R=r,ken DELTA=22 (20 added, 0 deleted, 2 changed) OCL=28255 CL=28290
2009-05-03more morestack fiddlingKen Thompson1-2/+23
R=r OCL=28204 CL=28204
2009-04-02turn gc of unused data/code back on in loaders.Russ Cox1-2/+2
turned it off while debugging 8 runtime problem, checked in the change accidentally. R=r DELTA=4 (0 added, 0 deleted, 4 changed) OCL=27040 CL=27046
2009-03-31* move go-specific loader codeRuss Cox1-0/+587
into gc directory, where it gets included as ../gc/ldbody this is similar to the assemblers including ../cc/lexbody and ../cc/macbody. * hook go-specific loader code into 8l. * make current 8.out.h and 6.out.h backward compatible with plan 9's versions. i had added some constants in the middle of enums and have now moved them to the end. this keeps us from invalidating old .8 and .6 files. not sure how much it really matters, but easy to do. R=r DELTA=1314 (667 added, 623 deleted, 24 changed) OCL=26938 CL=26941