1
0
mirror of https://github.com/golang/go synced 2024-11-12 05:30:21 -07:00

cmd/ld: DWARF opcode base to 10

DWARF 2 has 9 standard opcodes, so dwarfdump expects us to use an
opcode base of at least 10. Previously we used 5.

Discussion:
https://groups.google.com/forum/#!topic/golang-dev/d-BqpPgalzc

LGTM=josharian, rsc
R=golang-codereviews, gobot, rsc, josharian, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/69320043
This commit is contained in:
Graham King 2014-03-03 11:11:04 -08:00 committed by Josh Bleecher Snyder
parent 3656c2db96
commit ebe1eb6537

View File

@ -1412,7 +1412,7 @@ finddebugruntimepath(LSym *s)
enum { enum {
LINE_BASE = -1, LINE_BASE = -1,
LINE_RANGE = 4, LINE_RANGE = 4,
OPCODE_BASE = 5 OPCODE_BASE = 10
}; };
static void static void
@ -1541,11 +1541,16 @@ writelines(void)
cput(1); // default_is_stmt cput(1); // default_is_stmt
cput(LINE_BASE); // line_base cput(LINE_BASE); // line_base
cput(LINE_RANGE); // line_range cput(LINE_RANGE); // line_range
cput(OPCODE_BASE); // opcode_base (we only use 1..4) cput(OPCODE_BASE); // opcode_base
cput(0); // standard_opcode_lengths[1] cput(0); // standard_opcode_lengths[1]
cput(1); // standard_opcode_lengths[2] cput(1); // standard_opcode_lengths[2]
cput(1); // standard_opcode_lengths[3] cput(1); // standard_opcode_lengths[3]
cput(1); // standard_opcode_lengths[4] cput(1); // standard_opcode_lengths[4]
cput(1); // standard_opcode_lengths[5]
cput(0); // standard_opcode_lengths[6]
cput(0); // standard_opcode_lengths[7]
cput(0); // standard_opcode_lengths[8]
cput(1); // standard_opcode_lengths[9]
cput(0); // include_directories (empty) cput(0); // include_directories (empty)
files = emallocz(ctxt->nhistfile*sizeof files[0]); files = emallocz(ctxt->nhistfile*sizeof files[0]);