From ebe1eb6537d4873863db4a526250a0e5ddab41b2 Mon Sep 17 00:00:00 2001 From: Graham King Date: Mon, 3 Mar 2014 11:11:04 -0800 Subject: [PATCH] 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 --- src/cmd/ld/dwarf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cmd/ld/dwarf.c b/src/cmd/ld/dwarf.c index 4f1847ecb3..fe1576bf51 100644 --- a/src/cmd/ld/dwarf.c +++ b/src/cmd/ld/dwarf.c @@ -1412,7 +1412,7 @@ finddebugruntimepath(LSym *s) enum { LINE_BASE = -1, LINE_RANGE = 4, - OPCODE_BASE = 5 + OPCODE_BASE = 10 }; static void @@ -1541,11 +1541,16 @@ writelines(void) cput(1); // default_is_stmt cput(LINE_BASE); // line_base 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(1); // standard_opcode_lengths[2] cput(1); // standard_opcode_lengths[3] 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) files = emallocz(ctxt->nhistfile*sizeof files[0]); -- 2.48.1