Commit ebe1eb65 authored by Graham King's avatar Graham King Committed by Josh Bleecher Snyder

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
parent 3656c2db
...@@ -1412,7 +1412,7 @@ finddebugruntimepath(LSym *s) ...@@ -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) ...@@ -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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment