summaryrefslogtreecommitdiff
path: root/src/cmd/6l/l.h
AgeCommit message (Collapse)AuthorFilesLines
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý1-0/+1
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-1/+2
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-72/+68
2010-04-275l, 6l, 8l, runtime: make -s binaries workRuss Cox1-0/+3
5l, 6l, 8l: change ELF header so that strip doesn't destroy binary Fixes issue 261. R=iant, r CC=golang-dev http://codereview.appspot.com/994044
2010-03-23Add support for #pragma dynexport.Ian Lance Taylor1-0/+1
R=rsc CC=golang-dev http://codereview.appspot.com/661043
2010-03-22Rename dynld to dynimport throughout.Ian Lance Taylor1-2/+2
Cgo users will need to rerun cgo. R=rsc CC=golang-dev http://codereview.appspot.com/692041
2010-02-26Add -r option to 6l/8l/5l.Ian Lance Taylor1-0/+1
This permits more flexibility with cgo and swig in cases where the program is run on a machine other than the one on which it is built. Rather than storing the absolute path to the shared library in the DT_NEEDED entry, we can store just the name, and let the dynamic linker find it using DT_RUNPATH or the LD_LIBRARY_PATH environment variable. R=rsc CC=golang-dev http://codereview.appspot.com/223068
2009-11-04speed up 6lKen Thompson1-2/+5
hopefully no change R=rsc http://go/go-review/1017035
2009-11-036l -e: emit external ELF symbol table.Russ Cox1-0/+4
enough to make nm and oprofile work. R=r http://go/go-review/1017016
2009-10-07factor portable object+library bits out of 5l/6l/8l into ldRuss Cox1-35/+6
R=r DELTA=3214 (904 added, 2260 deleted, 50 changed) OCL=35425 CL=35427
2009-10-05allow multiple -L optionsRob Pike1-1/+0
R=rsc DELTA=31 (15 added, 3 deleted, 13 changed) OCL=35364 CL=35364
2009-10-038c, 8l dynamic loading support.Russ Cox1-0/+4
better mach binaries. cgo working on darwin+linux amd64+386. eliminated context switches - pi is 30x faster. add libcgo to build. on snow leopard: - non-cgo binaries work; all tests pass. - cgo binaries work on amd64 but not 386. R=r DELTA=2031 (1316 added, 626 deleted, 89 changed) OCL=35264 CL=35304
2009-08-24ffi -> dynld.Russ Cox1-3/+2
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-24linker workRuss Cox1-0/+3
* 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/+9
* 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-20FFI step 2: can ask for libc.so.6.Russ Cox1-0/+1
introduced explicit "data" symbol instead of etext to mark beginning of data, so that using larger alignment (i.e. 4MB like GNU loader) doesn't confuse garbage collector. split dodata into dodata and dobss in preparation for putting the dynamic data + headers in the data segment instead of stuffed at the beginning of the binary. R=r DELTA=52 (37 added, 3 deleted, 12 changed) OCL=33610 CL=33618
2009-08-136g/6l: add go type information to symbol table.Russ Cox1-1/+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-12mechanism for putting go types into 6.out symbol table.Russ Cox1-0/+1
no types yet. R=ken OCL=33142 CL=33146
2009-08-12change gotype in symbol table fromRuss Cox1-1/+1
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-21make 6l produce dynamically linked binaries (although they are fully ↵Rob Pike1-1/+0
statically linked as far as go is concerned). the -d flag is now flipped; as on the mac, -d disables dynamic. much remains to be improved to move the output closer to the gcc format. R=rsc DELTA=366 (310 added, 30 deleted, 26 changed) OCL=31929 CL=31951
2009-07-20clean up generation of exec header.Rob Pike1-3/+8
make endianness explicit when writing values. R=rsc DELTA=129 (37 added, 7 deleted, 85 changed) OCL=31826 CL=31854
2009-07-17First steps towards cleaner support for ELF64 in 6l.Rob Pike1-8/+2
R=rsc DELTA=337 (165 added, 119 deleted, 53 changed) OCL=31786 CL=31794
2009-07-07the ld-supplied typestrings are now obsoleteRuss Cox1-2/+0
R=r DELTA=167 (0 added, 167 deleted, 0 changed) OCL=31304 CL=31316
2009-04-30change 6l library directory flag to -L,Russ Cox1-1/+1
to match traditional c linkers. R=r DELTA=42 (8 added, 12 deleted, 22 changed) OCL=28101 CL=28115
2009-04-17add -P pkgdir option to 6l to have it look first in pkgdir for a package.Rob Pike1-0/+1
this allows gotest to find the locally built package when doing make gotest without this option, one would have to say make install gotest which kinda defeats the purpose based on discussions with rsc. R=ken,rsc DELTA=12 (10 added, 1 deleted, 1 changed) OCL=27606 CL=27606
2009-03-31* move go-specific loader codeRuss Cox1-1/+0
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
2009-02-05heuristic to stop pulling .6 in from .aRuss Cox1-2/+0
is not right if the .6 is only for data and the init function. instead of that, pick up everything and let the dead code/data eliminator throw away the parts that weren't useful. R=r DELTA=25 (0 added, 22 deleted, 3 changed) OCL=24446 CL=24446
2009-01-21delete unused code and data from 6.outs.Russ Cox1-2/+5
cuts simple test binary by 7%. would be more except for reflection. R=r DELTA=126 (117 added, 4 deleted, 5 changed) OCL=23163 CL=23237
2009-01-206l: do not link in objects from an archive just for init functions.Russ Cox1-1/+8
(makes go libraries behave more like c libraries.) R=r DELTA=85 (67 added, 12 deleted, 6 changed) OCL=23133 CL=23139
2009-01-15diagnose missing symbols instead ofRob Pike1-0/+1
silently miscompiling. R=rsc OCL=22872 CL=22872
2008-12-04emit dynamically linked 6.out on darwin instead of static,Russ Cox1-0/+1
unless given -d flag. the resulting binary doesn't *use* any dynamic libraries, it just has a reference to the dynamic linker and an empty list of needed symbols and libraries. this is enough to make 6.out binaries that can be run under dtrace / dtruss. R=r DELTA=39 (34 added, 0 deleted, 5 changed) OCL=20476 CL=20482
2008-11-20symbol table changesRuss Cox1-0/+2
* add gotype string to symbol table * fill in gotype in 6l for known funcs/vars * print gotype with nm -t * load symbol and pc/ln tables into memory at magic address 0x99<<32. * add sys.symdat() to retrieve raw bytes of symbol table and pc/ln table. most of this should be considered experimental and subject to change. R=r DELTA=157 (128 added, 0 deleted, 29 changed) OCL=19746 CL=19750
2008-11-056g interface changes:Russ Cox1-0/+1
* allow conversion between nil interface and any type. * mark signatures as DUPOK so that multiple .6 can contain sigt.*[]byte and only one gets used. R=ken OCL=18538 CL=18542
2008-11-036l: generate gotypesigs on demand.Russ Cox1-0/+2
add sys.unreflect, which uses gotypesigs. R=r DELTA=170 (152 added, 12 deleted, 6 changed) OCL=18396 CL=18404
2008-10-216l: invent gotypestrings if neededRuss Cox1-1/+5
R=r DELTA=419 (409 added, 5 deleted, 5 changed) OCL=17524 CL=17530
2008-10-206l:Russ Cox1-1/+1
use libbio instead of maintaining own buffer libbio: always use vlong offsets; die if off_t is too small R=r DELTA=163 (23 added, 63 deleted, 77 changed) OCL=17508 CL=17512
2008-10-20use Biobuf not fd for reading objects.Russ Cox1-1/+2
will make reading type info easier. R=r DELTA=21 (2 added, 1 deleted, 18 changed) OCL=17491 CL=17501
2008-08-03make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.Russ Cox1-33/+33
these guys really really want long to be 32-bits, so ,s/long/int32/ (and then manual fixup). still passes all tests. (i started out looking for just those longs that needed to be int32 instead, and it was just too hard to track them down one by one.) the longs were rare enough that i don't think it will cause integration problems. R=ken OCL=13787 CL=13789
2008-06-29segmented stacksKen Thompson1-2/+1
SVN=125267
2008-06-27segmented stackKen Thompson1-0/+4
SVN=125151
2008-06-18stack offsetKen Thompson1-1/+1
SVN=123521
2008-06-18stack offseet table markerKen Thompson1-0/+1
tacked above each TEXT entry SVN=123496
2008-06-15add support for debugging in MACH binariesRob Pike1-0/+1
fix up libmach_amd64 to handle MACH binaries and symbols db now works on mac and linux SVN=122807
2008-06-13add symbol tables and line/pc information to 6.outsRob Pike1-1/+1
SVN=122699
2008-06-09new elf headerKen Thompson1-0/+10
SVN=121737
2008-06-05goos goarchKen Thompson1-1/+2
SVN=121348
2008-06-04Add compiler source to new directory structureRob Pike1-0/+430
SVN=121164