aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/objfile.go
AgeCommit message (Collapse)Author
2016-04-07cmd: extract obj's Biobuf code into new bio packageMatthew Dempsky
API could still be made more Go-ey. Updates #15165. Change-Id: I514ffceffa43c293ae5d7e5f1e9193fda0098865 Reviewed-on: https://go-review.googlesource.com/21644 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-07cmd: add new common architecture representationMatthew Dempsky
Information about CPU architectures (e.g., name, family, byte ordering, pointer and register size) is currently redundantly scattered around the source tree. Instead consolidate the basic information into a single new package cmd/internal/sys. Also, introduce new sys.I386, sys.AMD64, etc. names for the constants '8', '6', etc. and replace most uses of the latter. The notable exceptions are a couple of error messages that still refer to the old char-based toolchain names and function reltype in cmd/link. Passes toolstash/buildall. Change-Id: I8a6f0cbd49577ec1672a98addebc45f767e36461 Reviewed-on: https://go-review.googlesource.com/21623 Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-05cmd/compile: give TLS relocations a name when dumping assemblyJosh Bleecher Snyder
Before: ... 0x00d0 ff ff ff e8 00 00 00 00 e9 23 ff ff ff cc cc cc .........#...... rel 5+4 t=14 +0 rel 82+4 t=13 runtime.writeBarrier+0 ... After: ... 0x00d0 ff ff ff e8 00 00 00 00 e9 23 ff ff ff cc cc cc .........#...... rel 5+4 t=14 TLS+0 rel 82+4 t=13 runtime.writeBarrier+0 ... Change-Id: Ibdaf694581b5fd5fb87fa8ce6a792f3eb4493622 Reviewed-on: https://go-review.googlesource.com/21545 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-01cmd/internal/obj: more idiomatic object writerShahar Kohanim
Change-Id: I41722ee605ea76a6b52e8a7e1e10f2293cef1a7a Reviewed-on: https://go-review.googlesource.com/21371 Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-03-30cmd/compile, cmd/link: record lengths in object fileShahar Kohanim
Record total number of relocations, pcdata, automatics, funcdata and files in object file and use these numbers in the linker to allocate contiguous slices to later be filled by the defined symbols. name old secs new secs delta LinkCmdGo 0.52 ± 3% 0.49 ± 3% -4.21% (p=0.000 n=91+92) LinkJuju 4.48 ± 4% 4.21 ± 7% -6.08% (p=0.000 n=96+100) name old MaxRSS new MaxRSS delta LinkCmdGo 122k ± 2% 120k ± 4% -1.66% (p=0.000 n=98+93) LinkJuju 799k ± 5% 865k ± 8% +8.29% (p=0.000 n=89+99) GOGC=off name old secs new secs delta LinkCmdGo 0.42 ± 2% 0.41 ± 0% -2.98% (p=0.000 n=89+70) LinkJuju 3.61 ± 0% 3.52 ± 1% -2.46% (p=0.000 n=80+89) name old MaxRSS new MaxRSS delta LinkCmdGo 130k ± 1% 128k ± 1% -1.33% (p=0.000 n=100+100) LinkJuju 1.00M ± 0% 0.99M ± 0% -1.70% (p=0.000 n=100+100) Change-Id: Ie08f6ccd4311bb78d8950548c678230a58635c73 Reviewed-on: https://go-review.googlesource.com/21026 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-28cmd/internal/obj: convert fields of LSym from uint8 to boolMarvin Stenger
No performance regression measurable: name old time/op new time/op delta Template 432ms ± 3% 422ms ± 2% -2.34% (p=0.010 n=10+9) GoTypes 1.46s ± 1% 1.46s ± 1% ~ (p=0.796 n=10+10) Compiler 7.15s ± 1% 7.14s ± 1% ~ (p=0.447 n=10+9) Change-Id: I21b93cb989017b6fec2215de2423d87f25cf538c Reviewed-on: https://go-review.googlesource.com/21220 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-21cmd/internal/obj, cmd/link: put all symbol data in one contiguous sectionMichael Hudson-Doyle
Another object file change, gives a reasonable improvement: name old s/op new s/op delta LinkCmdGo 0.46 ± 3% 0.44 ± 9% -3.34% (p=0.000 n=98+82) LinkJuju 4.09 ± 4% 3.92 ± 5% -4.30% (p=0.000 n=98+99) I guess the data section could be mmap-ed instead of read, I haven't tried that. Change-Id: I959eee470a05526ab1579e3f5d3ede41c16c954f Reviewed-on: https://go-review.googlesource.com/20928 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-03-20cmd/compile, cmd/link: remove unused fields from relocationsShahar Kohanim
Reduces size of archives in pkg/linux_amd64 by 3% from 41.5MB to 40.2MB Change-Id: Id64ca7995de8dd84c9e7ce1985730927cf4bfd66 Reviewed-on: https://go-review.googlesource.com/20912 Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-03-17cmd/compile: deduplicate symbol referencesShahar Kohanim
Reduces size of archives in pkg/linux_amd64 by 1.4MB (3.2%), slightly improving link time. name old s/op new s/op delta LinkCmdGo 0.52 ± 3% 0.51 ± 2% -0.65% (p=0.000 n=98+99) Change-Id: I7e265f4d4dd08967c5c5d55c1045e533466bbbec Reviewed-on: https://go-review.googlesource.com/20802 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-03-16cmd/internal/obj: remove LSym.EtextJosh Bleecher Snyder
Use a local variable instead. Passes toolstash -cmp. Change-Id: I9623a40ff0d568f11afd1279b6aaa1c33eda644c Reviewed-on: https://go-review.googlesource.com/20730 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-03-16cmd/internal/obj: remove LSym.NextJosh Bleecher Snyder
Instead, use a slice. Passes toolstash -cmp. Change-Id: I889fdb4ae997416f907522f549b96506be13bec7 Reviewed-on: https://go-review.googlesource.com/20699 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-16cmd/internal/obj: remove LSym.ValueJosh Bleecher Snyder
It is unused. Passes toolstash -cmp. Change-Id: I22ae2bb432ce6be377dea43cf018ffccb6e95f37 Reviewed-on: https://go-review.googlesource.com/20698 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-15cmd/link, cmd/compile: Add symbol references to object file.Shahar Kohanim
Symbols in the object file currently refer to each other using symbol name and version. Referring to the same symbol many times in an object file takes up space and causes redundant map lookups. Instead write out a list of unique symbol references and have symbols refer to each other using indexes into this list. Credit to Michael Hudson-Doyle for kicking this off. Reduces pkg/linux_amd64 size by 30% from 61MB to 43MB name old s/op new s/op delta LinkCmdGo 0.74 ± 3% 0.63 ± 4% -15.22% (p=0.000 n=20+20) LinkJuju 6.38 ± 6% 5.73 ± 6% -10.16% (p=0.000 n=20+19) Change-Id: I7e101a0c80b8e673a3ba688295e6f80ea04e1cfb Reviewed-on: https://go-review.googlesource.com/20099 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-14cmd/all: stop generating ADATA ProgsJosh Bleecher Snyder
The only remaining place that generated ADATA Prog was the assembler. Stop, and delete some now-dead code. Passes toolstash -cmp. Change-Id: I26578ff1b4868e98562b44f69d909c083e96f8d5 Reviewed-on: https://go-review.googlesource.com/20646 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-03-13cmd/compile: clean up savedataJosh Bleecher Snyder
Simplify function signature. Remove unused Ctxt field Enforce_data_order. Passes toolstash -cmp. Change-Id: I5caa270ca9ae725708fe415b2c978b5f40780255 Reviewed-on: https://go-review.googlesource.com/20644 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-13cmd/compile: minor cleanupJosh Bleecher Snyder
Passes toolstash -cmp. Change-Id: Ib8c76081956e1d4eecef16b82bc8d527d7849d7e Reviewed-on: https://go-review.googlesource.com/20643 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-13cmd/internal/obj: sort relocs by off when printingJosh Bleecher Snyder
This makes the output of compiling with -S more stable in the face of unimportant variation in the order in which relocs are generated. It is also more pleasant to read the relocs when they are sorted. Also, do some minor cleanup. For #14786 Change-Id: Id92020b13fd21777dfb5b29c2722c3b2eb27001b Reviewed-on: https://go-review.googlesource.com/20641 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-03-11cmd/compile: track reflect.Type.Method in deadcodeDavid Crawshaw
In addition to reflect.Value.Call, exported methods can be invoked by the Func value in the reflect.Method struct. This CL has the compiler track what functions get access to a legitimate reflect.Method struct by looking for interface calls to either of: Method(int) reflect.Method MethodByName(string) (reflect.Method, bool) This is a little overly conservative. If a user implements a type with one of these methods without using the underlying calls on reflect.Type, the linker will assume the worst and include all exported methods. But it's cheap. No change to any of the binary sizes reported in cl/20483. For #14740 Change-Id: Ie17786395d0453ce0384d8b240ecb043b7726137 Reviewed-on: https://go-review.googlesource.com/20489 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-03-02all: single space after period.Brad Fitzpatrick
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-01all: make copyright headers consistent with one space after periodBrad Fitzpatrick
This is a subset of https://golang.org/cl/20022 with only the copyright header lines, so the next CL will be smaller and more reviewable. Go policy has been single space after periods in comments for some time. The copyright header template at: https://golang.org/doc/contribute.html#copyright also uses a single space. Make them all consistent. Change-Id: Icc26c6b8495c3820da6b171ca96a74701b4a01b0 Reviewed-on: https://go-review.googlesource.com/20111 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-26cmd/internal/obj: Fix generation of assembly with -SKeith Randall
We can't drop Prog entries when we want to print disassembly. Added a test for -S. Fixes #14515 Change-Id: I44c72f70f7a3919acc01c559d30335d26669e76f Reviewed-on: https://go-review.googlesource.com/19930 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-24cmd/compile: don't free the Prog list if we look at it after flushKeith Randall
Only tests do this, provide them a hook to disable freeing after flush. Change-Id: I810c6c51414a93f476a18ba07b807e16092bf8cf Reviewed-on: https://go-review.googlesource.com/19907 Reviewed-by: Keith Randall <khr@golang.org>
2016-02-24cmd/compile: reuseable cache of Prog structsKeith Randall
Reuseable cache of Prog entries. Improves compiler speed by ~10%. Update #13646 Change-Id: I01bd8606540d989ea8b8ba5131d1275ba380d976 Reviewed-on: https://go-review.googlesource.com/19868 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-24cmd/compile: Drop references to Prog structs after each functionKeith Randall
Don't accumulate a massive list of Prog structs during compilation and write them all out at the end of compilation. Instead, convert them to code+relocs (or data+relocs) after each function is compiled. Track down a few other places that were keeping Progs alive and nil them out so the Progs get GCd promptly. Saves ~20% in peak memory usage for the compiler. Surprisingly not much help speed-wise (only because we end up doing more GCs. With a compensating GOGC=120, it does help a bit), but this provides a base for more changes (e.g. reusing a cache of Progs). Change-Id: I838e01017c228995a687a8110d0cd67bf8596407 Reviewed-on: https://go-review.googlesource.com/19867 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-24cmd/compile: keep JMPs around with -NKeith Randall
When -N, make sure we don't drop every instruction from a block, even ones which would otherwise be empty. Helps keep line numbers around for debugging, particularly for break and continue statements (which often compile down to nothing). Fixes #14379 Change-Id: I33722c4f0dcd502f146fa48af262ba3a477c959a Reviewed-on: https://go-review.googlesource.com/19854 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
2016-02-19cmd/internal/obj: hoist fieldtrack code out of x86 back endRuss Cox
Change-Id: I38e59088c37426d914ce2b4dfc79f3d476e06f49 Reviewed-on: https://go-review.googlesource.com/19617 Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-01-14cmd/internal/obj: separate code layout from object writingRuss Cox
This will allow the compiler to crunch Prog lists down to code as each function is compiled, instead of waiting until the end, which should reduce the working set of the compiler. But not until Go 1.7. This also makes it easier to write some machine code output tests for the assembler, which is why it's being done now. For #13822. Change-Id: I0811123bc6e5717cebb8948f9cea18e1b9baf6f7 Reviewed-on: https://go-review.googlesource.com/18311 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-09-08cmd/internal/obj: remove dead code and small cleanupsMichael Hudson-Doyle
Change-Id: I88fa0cc245a2141af04acced8716e08b1133abd1 Reviewed-on: https://go-review.googlesource.com/14350 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-09-03cmd/internal/obj: some platform independent bits of proper toolchain support ↵Michael Hudson-Doyle
for thread local storage Also simplifies some silliness around making the .tbss section wrt internal vs external linking. The "make TLS make sense" project has quite a few more steps to go. Issue #11270 Change-Id: Ia4fa135cb22d916728ead95bdbc0ebc1ae06f05c Reviewed-on: https://go-review.googlesource.com/13990 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-05-29cmd/internal/obj: fix build breakage from making From3 a pointerBrad Fitzpatrick
Change-Id: I55a7f455ebbd6b1bd6912aae82c0fcff6f43387c Reviewed-on: https://go-review.googlesource.com/10512 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-05-01cmd/internal/obj: clean up BiobufDave Cheney
This is a follow up to rev 443a32e707d2 which reduces some of the duplication between methods and functions that operate on obj.Biobuf. obj.Biobuf has Flush and Write methods as well as helpers which duplicate those methods, consolidate on the former and remove the latter. Also, address a final comment from CL 9525. Change-Id: I67deaf3a163bb489a9bb21bb39524785d7a2f6c5 Reviewed-on: https://go-review.googlesource.com/9527 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-04-24cmd/internal/gc, cmd/internal/ld, cmd/internal/obj: teach compiler about ↵Michael Hudson-Doyle
local symbols This lets us avoid loading string constants via the GOT and (together with http://golang.org/cl/9102) results in the fannkuch benchmark having very similar register usage with -dynlink as without. Change-Id: Ic3892b399074982b76773c3e547cfbba5dabb6f9 Reviewed-on: https://go-review.googlesource.com/9103 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
2015-04-21cmd/internal/obj: reuse the varint encoding bufferJosh Bleecher Snyder
This reduces the number of allocations in the compiler while building the stdlib by 15.66%. No functional changes. Passes toolstash -cmp. Change-Id: Ia21b37134a8906a4e23d53fdc15235b4aa7bbb34 Reviewed-on: https://go-review.googlesource.com/9085 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-21cmd/6l, cmd/internal/ld, cmd/internal/obj: remove Xsym/Xadd from compiler's ↵Michael Hudson-Doyle
Reloc They don't really make any sense on this side of the compiler/linker divide. Some of the code touching these fields was the support for R_TLS when thechar=='6' which turns out to be dead and so I just removed all of that. Change-Id: I4e265613c4e7fcc30a965fffb7fd5f45017f06f3 Reviewed-on: https://go-review.googlesource.com/9107 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-04-20cmd/internal/obj: manual C->Go cleanupsBrad Fitzpatrick
Change-Id: I5964fc55157dc1df7be400dfa0df591d6163e25e Reviewed-on: https://go-review.googlesource.com/9084 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
2015-03-17cmd/internal/obj: reimplement line historyRuss Cox
In addition to possibly being clearer code, this replaces an O(n) lookup with an O(log n) lookup. Change-Id: I0a574c536a965a87f7ad6dcdcc30f737bc771cd5 Reviewed-on: https://go-review.googlesource.com/7623 Reviewed-by: Rob Pike <r@golang.org>
2015-03-05cmd/5l etc: restore comments lost during C -> Go conversionRuss Cox
It appears that c2go dropped comments inside struct { ... } and enum { ... }. Restore them. Identified missing comments by checking for comments present in the C code but not the Go code, made a list, and then reapplied with some mechanical help. Missing comment finder: http://play.golang.org/p/g6qNUAo1Y0 Change-Id: I323ab45c7ef9d51e28eab3b699eb14bee1eef66b Reviewed-on: https://go-review.googlesource.com/6899 Reviewed-by: Rob Pike <r@golang.org>
2015-03-03cmd/5g etc: mechanical cleanupRuss Cox
Run rsc.io/grind rev 796d0f2 on C->Go conversions. This replaces various awkward := initializations with plain var declarations. Checked bit-for-bit compatibility with toolstash + buildall. Change-Id: I601101d8177894adb9b0e3fb55dfe0ed4f544716 Reviewed-on: https://go-review.googlesource.com/6517 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-02-23[dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead codeRuss Cox
Ran rsc.io/grind rev 6f0e601 on the source files. The cleanups move var declarations as close to the use as possible, splitting disjoint uses of the var into separate variables. They also remove dead code (especially in func sudoaddable), which helps with the var moving. There's more cleanup to come, but this alone cuts the time spent compiling html/template on my 2013 MacBook Pro from 3.1 seconds to 2.3 seconds. Change-Id: I4de499f47b1dd47a560c310bbcde6b08d425cfd6 Reviewed-on: https://go-review.googlesource.com/5637 Reviewed-by: Rob Pike <r@golang.org>
2015-02-20[dev.cc] cmd/internal/obj, cmd/internal/gc, new6g: reconvertRuss Cox
Reconvert using rsc.io/c2go rev 27b3f59. Changes to converter: - fatal does not return, so no fallthrough after fatal in switch - many more function results and variables identified as bool - simplification of negated boolean expressions Change-Id: I3bc67da5e46cb7ee613e230cf7e9533036cc870b Reviewed-on: https://go-review.googlesource.com/5171 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-02-05[dev.cc] cmd/internal/obj: reconvert from liblinkRuss Cox
cmd/internal/obj reconverted using rsc.io/c2go rev 2a95256. - Brings in new, more regular Prog, Addr definitions - Add Prog* argument to oclass in liblink/asm[68].c, for c2go conversion. - Update objwriter for change in TEXT size encoding. - Merge 5a, 6a, 8a, 9a changes into new5a, new6a, new8a, new9a (by hand). - Add +build ignore to cmd/asm/internal/{addr,arch,asm}, cmd/asm. They need to be updated for the changes. - Reenable verifyAsm in cmd/go. - Reenable GOOBJ=2 mode by default in liblink. All architectures build successfully again. Change-Id: I2c845c5d365aa484b570476898171bee657b626d Reviewed-on: https://go-review.googlesource.com/3963 Reviewed-by: Rob Pike <r@golang.org>
2015-01-21[dev.cc] cmd/internal/obj: export more symbols, rename Type_ to TypeRuss Cox
For new assembler, reconvert using rsc.io/c2go rev f9db76e. - Removes trailing _ from Go keywords that are exported. - Export regstr as Register, anames[5689] as Anames. Also update clients. Change-Id: I41c8fd2d14490236f548b4aa0ed0b9bd7571d2d7 Reviewed-on: https://go-review.googlesource.com/3151 Reviewed-by: Rob Pike <r@golang.org>
2015-01-21[dev.cc] cmd/internal/obj: convert liblink C to GoRuss Cox
This CL adds the real cmd/internal/obj packages. Collectively they correspond to the liblink library. The conversion was done using rsc.io/c2go's run script at rsc.io/c2go repo version 706fac7. This is not the final conversion, just the first working draft. There will be more updates, but this works well enough to use with go tool objwriter and pass all.bash. Change-Id: I9359e835425f995a392bb2fcdbebf29511477bed Reviewed-on: https://go-review.googlesource.com/3046 Reviewed-by: Ian Lance Taylor <iant@golang.org>