1
0
mirror of https://github.com/golang/go synced 2024-11-12 12:40:28 -07:00
Commit Graph

562 Commits

Author SHA1 Message Date
Ian Lance Taylor
c99cfd93a8 cmd/link: don't use internal linking mode for cgo on PPC64
The internal linker doesn't know how to handle multiple TOC sections
in internal linking mode. This used to work because before CL 64793 we
invoked ld -r on multiple objects, and that merged the TOC sections
for us.

Updates #21961

Change-Id: I48260a7195be660016f2f358ebc8cb79652210ab
Reviewed-on: https://go-review.googlesource.com/66270
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-26 15:06:32 +00:00
Marvin Stenger
f22ba1f247 all: prefer strings.IndexByte over strings.Index
strings.IndexByte was introduced in go1.2 and it can be used
effectively wherever the second argument to strings.Index is
exactly one byte long.

This avoids generating unnecessary string symbols and saves
a few calls to strings.Index.

Change-Id: I1ab5edb7c4ee9058084cfa57cbcc267c2597e793
Reviewed-on: https://go-review.googlesource.com/65930
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-25 17:35:41 +00:00
Alessandro Arzilli
9daee93121 cmd/compile,cmd/link: export int global consts to DWARF
Updates #14517

Change-Id: I23ef88e71c89da12dffcadf5562ea2d7557b62cf
Reviewed-on: https://go-review.googlesource.com/61019
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-22 17:44:50 +00:00
Avelino
6a537c1d47 cmd/link: Grouping declaration of variables on ld/pe.go
Change-Id: I33284d3154db43b2b89418c5076df79407e7cf41
Reviewed-on: https://go-review.googlesource.com/60931
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-21 01:01:13 +00:00
Ian Lance Taylor
8e5ac83d43 cmd/go: stop linking cgo objects together with ld -r
https://golang.org/cl/5822049 introduced the idea of linking together
all the cgo objects with -r, while also linking against -lgcc. This
was to fix http://golang.org/issue/3261: cgo code that requires libgcc
would break when using internal linking.

This approach introduced https://golang.org/issue/9510: multiple
different cgo packages could include the same libgcc object, leading
to a multiple definition error during the final link. That problem was
fixed by https://golang.org/cl/16741, as modified by
https://golang.org/cl/16993, which did the link against libgcc only
during the final link.

After https://golang.org/cl/16741, and, on Windows, the later
https://golang.org/cl/26670, ld -r no longer does anything useful.

So, remove it.

Doing this revealed that running ld -r on Darwin simplifies some
relocs by making them specific to a symbol rather than a section.
Correct the handling of unsigned relocations in internal linking mode
by offsetting by the symbol value. This only really comes up when
using the internal linker with C code that initializes a variable to
the address of a local constant, such as a C string (as in const char
*s = "str";). This change does not affect the normal case of external
linking, where the Add field is ignored. The test case is
misc/cgo/test/issue6612.go in internal linking mode.

The cmd/internal/goobj test can now see an external object with no
symbol table; fix it to not crash in that case.

Change-Id: I15e5b7b5a8f48136bc14bf4e1c4c473d5eb58062
Reviewed-on: https://go-review.googlesource.com/64793
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-09-20 21:33:55 +00:00
Hiroshi Ioka
fb54abe9ce all: correct location of go tool
In general, there are no guarantee that `go` command exist on $PATH.
This CL tries to get `go` command from $GOROOT/bin instead.

There are three kinds of code we should handle:
    For normal code, the CL implements goCmd() or goCmdName().
    For unit tests, the CL uses testenv.GoTool() or testenv.GoToolPath().
    For integration tests, the CL sets PATH=$GOROOT/bin:$PATH in cmd/dist.

Note that make.bash sets PATH=$GOROOT/bin:$PATH in the build process.
So this change is only useful when we use toolchain manually.

Updates #21875

Change-Id: I963b9f22ea732dd735363ececde4cf94a5db5ca2
Reviewed-on: https://go-review.googlesource.com/64650
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-20 03:54:16 +00:00
Matthew Dempsky
f84a1db19f cmd/link: replace unrolled Cput loops with Cwrite/Cwritestring
Passes toolstash-check -all.

Change-Id: I1c85a2c0390517f4e9cdbddddbf3c353edca65b3
Reviewed-on: https://go-review.googlesource.com/64051
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-15 19:09:39 +00:00
Kunpei Sakai
5a986eca86 all: fix article typos
a -> an

Change-Id: I7362bdc199e83073a712be657f5d9ba16df3077e
Reviewed-on: https://go-review.googlesource.com/63850
Reviewed-by: Rob Pike <r@golang.org>
2017-09-15 02:39:16 +00:00
Lynn Boger
e9cbabb334 cmd/link: enable -buildmode=plugin for ppc64le
This enables support for the buildmode plugin on
ppc64le.

Fixes #20756

Change-Id: I83241ff63f9b5c366fe0496cf46a3f67d75d08ac
Reviewed-on: https://go-review.googlesource.com/55850
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-09-11 21:20:38 +00:00
Hiroshi Ioka
f797e485e0 cmd/link: don't generate runtime.text twice for buildmode=plugin on darwin
https://golang.org/cl/29394 changed to include runtime.text and
runtime.etext in ctxt.Textp as a work around.
But it seems that the CL forgot to change genasmsym.
As a result, we are generating runtime.text and runtime.etext twice.

Change-Id: If7f8faf496c1c489ffa4804da712f91a3d3f4be4
Reviewed-on: https://go-review.googlesource.com/62810
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-11 02:30:05 +00:00
Hiroshi Ioka
410b73728f cmd/link: remove windows-specific kludges from Adddynrel
Adddynrel does nothing on windows. We can make code don't call Adddynrel
on windows in the first place.

Change-Id: I376cc36d44a5df18bda13be57e3916ca3062f181
Reviewed-on: https://go-review.googlesource.com/62611
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2017-09-10 23:19:52 +00:00
Hiroshi Ioka
1134411a83 cmd/go, cmd/link, cmd/dist: re-enable plugin mode on darwin/amd64
1. remove broken verification
   The runtime check assumes that no-pcln symbol entry have zero value,
   but the linker emit no entries if the symbol is no-pcln.
   As a result, if there are no-pcln symbols at the very end of pcln
   table, it will panic.
2. correct condition of export
   Handle special chracters in pluginpath correcty.
   Export "go.itab.*", so different plugins can share the same itab.

Fixes #18190

Change-Id: Ia4f9c51d83ce8488a9470520f1ee9432802cfc1d
Reviewed-on: https://go-review.googlesource.com/61091
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-10 12:54:13 +00:00
Hiroshi Ioka
f58c48f834 cmd/link: extract windows-specific code from dynrelocsym
No functional changes.

Change-Id: Ib31bb3f01b515aac6428ec61e0ef02b269623890
Reviewed-on: https://go-review.googlesource.com/62470
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-09 07:06:23 +00:00
Heschi Kreinick
37dbfc51b0 cmd/link: emit DW_AT_data_member_location as a constant
Simplify the DWARF representation of structs by emitting field offsets
as constants rather than location descriptions.

This was not explicitly mentioned as an option in DWARF2. It is
mentioned in DWARF4, but isn't listed in the changes, so it's not clear
if this was always intended to work or is an undocumented change. Either
way, it should be valid DWARF4.

Change-Id: Idf7fdd397a21c8f8745673ecc77ef65afa3ffe1c
Reviewed-on: https://go-review.googlesource.com/51611
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2017-08-31 19:42:23 +00:00
Alex Brainman
d77d4f509c cmd/link: unexport all peSection fields
Change-Id: I83e168f0d1dd1897a0c02c0f1233e1054e93fb0f
Reviewed-on: https://go-review.googlesource.com/59791
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-30 01:36:22 +00:00
Alex Brainman
3bd79713b7 cmd/link: introduce and use peFile.addDWARF
Change-Id: I2c217e03779772605aa0b5a33ef80459333eeebc
Reviewed-on: https://go-review.googlesource.com/59790
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-30 01:35:29 +00:00
Hiroshi Ioka
0e2cde7c69 cmd/link: refactor container()
* rename to emitPcln because I'd like to skip not only container types,
  but also something like "go.buildid" in the future.
* return bool instead of int.

Change-Id: I029adb81292f7dd2fe98e69f3877c5c27f32ec30
Reviewed-on: https://go-review.googlesource.com/59415
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
2017-08-30 01:07:31 +00:00
Ian Lance Taylor
5a7283f146 cmd/link: remove unused SFILE and FileSym
Change-Id: Iec610753052abcf6941a1cd16a9256ee9d689732
Reviewed-on: https://go-review.googlesource.com/59750
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hiroshi Ioka <hirochachacha@gmail.com>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2017-08-29 23:29:45 +00:00
Hiroshi Ioka
1e093043e7 cmd/link: remove dead code
Change-Id: I8a54235c8b7bf1010f19d0d358cd4f76fc911d28
Reviewed-on: https://go-review.googlesource.com/59416
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-29 23:29:24 +00:00
Hiroshi Ioka
bce795fb1f cmd/link: unexport Elfadddynsym
Change-Id: Ifc66bd8c32e788f35da3bd105bcdcfd04bd3dabc
Reviewed-on: https://go-review.googlesource.com/59414
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
2017-08-29 23:29:00 +00:00
Hiroshi Ioka
4eca0898ec cmd/link: refactor addlib
* extract pkgname() and findlib() from the function for #18190.
* rename const pkgname to const pkgdef to avoid confliction.

Change-Id: Ie62509bfbddcf19cf92b5b12b598679a069e6e74
Reviewed-on: https://go-review.googlesource.com/59417
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-29 23:28:32 +00:00
Alex Brainman
b7397c8100 cmd/link: make it compile again (fixes build)
CL 59375 changed Reloc.Done to bool, but that change
got lost in pe.go while merging. Restore that change.

Change-Id: Ie5a89e85579cdc9282f504fefd56355cfeb49389
Reviewed-on: https://go-review.googlesource.com/59711
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2017-08-29 02:36:27 +00:00
Alex Brainman
ce54a0c10a cmd/link: introduce and use peFile.writeOptionalHeader
Change-Id: I27b33f2425281bc1790528ae514d99a468ad7fce
Reviewed-on: https://go-review.googlesource.com/59429
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:08:51 +00:00
Alex Brainman
cb3fe3aa0d cmd/link: introduce and use peFile.dataDirectory
Change-Id: I61f64287a488ed82e71639540697b6ade5a0426a
Reviewed-on: https://go-review.googlesource.com/59428
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:07:54 +00:00
Alex Brainman
ac9be2020b cmd/link: introduce and use peFile.writeFileHeader
Change-Id: I1324b69ab9edb870589197fa601b5764634d42a4
Reviewed-on: https://go-review.googlesource.com/59427
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:07:11 +00:00
Alex Brainman
fe1ccc5b88 cmd/link: introduce and use peFile.writeSymbolTableAndStringTable
Change-Id: I506f5e146f3b5bf359d6932a85ac5572d3a3f103
Reviewed-on: https://go-review.googlesource.com/59426
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:06:26 +00:00
Alex Brainman
2034297bdb cmd/link: introduce and use peFile.writeSymbols
Change-Id: If629b19cebc6ae8dfbf603dcd7f2dd3d0046a935
Reviewed-on: https://go-review.googlesource.com/59425
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:05:23 +00:00
Alex Brainman
84af5ea9b4 cmd/link: simplify writePESymTableRecords
Change-Id: I2da982fdef826aaecb86431f7d80ffc0fb2c4337
Reviewed-on: https://go-review.googlesource.com/59424
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:04:06 +00:00
Alex Brainman
6561e4b61c cmd/link: introduce and use peFile.mapToPESection
Change-Id: I598e9da5587908f39faa13c11d2b42054f5a632d
Reviewed-on: https://go-review.googlesource.com/59423
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:01:26 +00:00
Alex Brainman
6f299c7f7e cmd/link: introduce and use peFile.writeSymbol
Change-Id: I9fcae7bfd647b52d9b4f36f04710ba7921609c02
Reviewed-on: https://go-review.googlesource.com/59422
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 02:00:21 +00:00
Alex Brainman
72967551e5 cmd/link: move perelocsect into peFile.emitRelocations (no code changed)
Change-Id: I807412bd743d544195aaf9d720f81b128b4636b3
Reviewed-on: https://go-review.googlesource.com/59421
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 01:59:12 +00:00
Alex Brainman
64985505b0 cmd/link: introduce peFile.ctorsSect and use it in peFile.emitRelocations
Change-Id: I65058c150a19aa4e3083fd8754d08ea23721844b
Reviewed-on: https://go-review.googlesource.com/59420
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 01:58:10 +00:00
Alex Brainman
3558c16d48 cmd/link: introduce and use peFile.emitRelocations
Change-Id: I2458d1391af063d99ba1e446bcf12f7c41ae5f6b
Reviewed-on: https://go-review.googlesource.com/59419
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 01:57:05 +00:00
Alex Brainman
04d410d6cd cmd/link: introduce and use peSection.emitRelocations
Change-Id: I2bebee5566ee07786695f147c27661e69337a0f7
Reviewed-on: https://go-review.googlesource.com/59418
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-29 01:51:26 +00:00
Hiroshi Ioka
88a1e85c70 cmd/link: fix warning for buildmode=plugin on darwin/amd64
Without this CL, the system linker complains about absolute addressing
in type..eqfunc.*.

Updates #18190

Change-Id: I68db37a7f4c96b16a9c13baffc0f043a3048df6d
Reviewed-on: https://go-review.googlesource.com/59373
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-29 00:51:34 +00:00
Hiroshi Ioka
0c4d035ca8 cmd/link: refactor *reloc
* use bool instead of int if it's adequate.
* remove blank lines.

Change-Id: Ic4a5644a33ed9fc7ce388ef8ba15f1732446fcfc
Reviewed-on: https://go-review.googlesource.com/59375
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-28 05:42:48 +00:00
Hiroshi Ioka
6eef2bb5ee cmd/link: avoid leaking file in ldshlibsyms
Change-Id: If27f7fbf94ede6f9a57f2520aaf75e6506e0b3f8
Reviewed-on: https://go-review.googlesource.com/59374
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2017-08-27 22:27:21 +00:00
Hiroshi Ioka
37b04c9062 cmd/link: fix debug message
Change-Id: I6cb0ed9b726da34106ba239b57e2da732a8e1b71
Reviewed-on: https://go-review.googlesource.com/50730
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: Avelino <t@avelino.xxx>
2017-08-25 22:49:00 +00:00
Heschi Kreinick
6d7db25e5c cmd/link: don't create go.info symbols for non-Go functions
In writelines the linker uses various auxiliary information about a
function to create its line table entries. (It also does some unrelated
stuff, but never mind.) There's no reason to do this for non-Go
functions, so it bails out if the symbol has no FuncInfo.

However, it does so *after* it looks up (and implicitly creates!) the
go.info symbol for the function, which doesn't make sense and risks
creating duplicate symbols for static C functions. Move the check up so
that it doesn't do that.

Since non-Go functions can't reference Go types, there shouldn't be any
relocations to type info DIEs that need to be built, so there should be
no harm not doing that.

I wanted to change the Lookup to an ROLookup but that broke the
shared-mode tests with an inscrutable error.

No test. It seems too specific to worry about, but if someone disagrees
I can figure something out.

Fixes #21566

Change-Id: I61f03b7c504a3bf1c4245a8811795b6303469e91
Reviewed-on: https://go-review.googlesource.com/58630
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-24 21:18:08 +00:00
Ian Lance Taylor
cd5c10f040 cmd/link: set correct alignment of ELF note section
Otherwise the default computation in symalign kicked in, setting the
alignment to be too high. This didn't matter with GNU ld, which put
each loadable note into a separate PT_NOTE segment, but it did matter
with gold which accumulated them all into a single PT_NOTE segment,
respecting the requested alignment. In the single PT_NOTE segment
generated by gold, the incorrect section alignment made the notes
unreadable.

Fixes #21564

Change-Id: I15eb408bb04a2566c9fdfb6828e14188d9ef2280
Reviewed-on: https://go-review.googlesource.com/58290
Reviewed-by: Russ Cox <rsc@golang.org>
2017-08-24 16:54:18 +00:00
Agniva De Sarker
ea5e3bd2a1 all: fix easy-to-miss typos
Using the wonderful https://github.com/client9/misspell tool.

Change-Id: Icdbc75a5559854f4a7a61b5271bcc7e3f99a1a24
Reviewed-on: https://go-review.googlesource.com/57851
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-23 03:07:12 +00:00
Heschi Kreinick
4a1be1e1da cmd/compile: emit DW_AT_decl_line
Some debuggers use the declaration line to avoid showing variables
before they're declared. Emit them for local variables and function
parameters.

DW_AT_decl_file would be nice too, but since its value is an index
into a table built by the linker, that's dramatically harder. In
practice, with inlining disabled it's safe to assume that all a
function's variables are declared in the same file, so this should still
be pretty useful.

Change-Id: I8105818c8940cd71bc5473ec98797cce2f3f9872
Reviewed-on: https://go-review.googlesource.com/44350
Reviewed-by: David Chase <drchase@google.com>
2017-08-22 18:05:53 +00:00
Alex Brainman
7f7be843e9 cmd/link: introduce and use peFile.addInitArray
Change-Id: I4377c478159129ab3f3b5ddc58d1944f8f4a4b07
Reviewed-on: https://go-review.googlesource.com/56320
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:10:10 +00:00
Alex Brainman
7188e00287 cmd/link: introduce and use peFile.nextSectOffset and nextFileOffset
Change-Id: Iecff99e85e2cca1127dca79747bb0d5362cd4125
Reviewed-on: https://go-review.googlesource.com/56319
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:08:54 +00:00
Alex Brainman
44211c14e4 cmd/link: remove pensect
Change-Id: Ia4abb76a8fa9e9ab280cd9162238ebd3fba79e4d
Reviewed-on: https://go-review.googlesource.com/56318
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:08:01 +00:00
Alex Brainman
97246527e8 cmd/link: introduce and use peFile.textSect, dataSect and bssSect
Change-Id: I6a1d33a759deaa4788bafb1c288d9b0e2fe3b026
Reviewed-on: https://go-review.googlesource.com/56317
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:06:55 +00:00
Alex Brainman
2c3d13b210 cmd/link: introduce and use peSection.pad
Change-Id: I068e9bb6e692b5eff193ddb46af3f04785f98518
Reviewed-on: https://go-review.googlesource.com/56316
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:06:06 +00:00
Alex Brainman
c3552a9050 cmd/link: introduce and use peSection.checkSegment
Change-Id: Idaab6516dae609e1707d4bce7bf7809ebfc8ec40
Reviewed-on: https://go-review.googlesource.com/56315
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:05:03 +00:00
Alex Brainman
2b0e9e8e9e cmd/link: introduce and use peSection.checkOffset
Change-Id: I093b79a8dd298bce8e8774c51a86a4873718978a
Reviewed-on: https://go-review.googlesource.com/56314
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:04:01 +00:00
Alex Brainman
1d53fc5123 cmd/link: introduce and use peFile.addDWARFSection
Change-Id: I8b23bfb85da9ece47e337f262bafd97f303dd1d1
Reviewed-on: https://go-review.googlesource.com/56313
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 02:02:47 +00:00