diff options
| author | Than McIntosh <thanm@google.com> | 2018-07-18 10:19:35 -0400 |
|---|---|---|
| committer | Than McIntosh <thanm@google.com> | 2018-08-30 12:35:33 +0000 |
| commit | dd9e81f678c74550dba7faefe3545d0839f28b65 (patch) | |
| tree | 57ff20cd2372e9a63a992f6d77cbfa3fa1ab8497 /src/cmd/link/internal/amd64 | |
| parent | f78cc1324a95b964f932b965a82f3c786cb1d932 (diff) | |
| download | go-dd9e81f678c74550dba7faefe3545d0839f28b65.tar.xz | |
cmd/link: move ElfType field in sym.Symbol to cold section
The sym.Symbol 'ElfType' field is used only for symbols corresponding
to things in imported shared libraries, hence is not needed in the
common case. Relocate it to sym.AuxSymbol so as to shrink the main
Symbol struct.
Updates #26186
Change-Id: I803efc561c31a0ca1d93eca434fda1c862a7b2c5
Reviewed-on: https://go-review.googlesource.com/125479
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/link/internal/amd64')
| -rw-r--r-- | src/cmd/link/internal/amd64/asm.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/amd64/asm.go b/src/cmd/link/internal/amd64/asm.go index 829635d219..e922fe2db9 100644 --- a/src/cmd/link/internal/amd64/asm.go +++ b/src/cmd/link/internal/amd64/asm.go @@ -410,7 +410,7 @@ func elfreloc1(ctxt *ld.Link, r *sym.Reloc, sectoff int64) bool { } case objabi.R_PCREL: if r.Siz == 4 { - if r.Xsym.Type == sym.SDYNIMPORT && r.Xsym.ElfType == elf.STT_FUNC { + if r.Xsym.Type == sym.SDYNIMPORT && r.Xsym.ElfType() == elf.STT_FUNC { ctxt.Out.Write64(uint64(elf.R_X86_64_PLT32) | uint64(elfsym)<<32) } else { ctxt.Out.Write64(uint64(elf.R_X86_64_PC32) | uint64(elfsym)<<32) |
