diff options
| author | Graham King <graham4king@gmail.com> | 2014-03-03 11:11:04 -0800 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2014-03-03 11:11:04 -0800 |
| commit | ebe1eb6537d4873863db4a526250a0e5ddab41b2 (patch) | |
| tree | 17276ebc53b9b14cfd9d048b0f5795a559dad7ed /src/cmd/ld | |
| parent | 3656c2db9639c524fe492ce74f485a35e0794cf4 (diff) | |
| download | go-ebe1eb6537d4873863db4a526250a0e5ddab41b2.tar.xz | |
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
Diffstat (limited to 'src/cmd/ld')
| -rw-r--r-- | src/cmd/ld/dwarf.c | 9 |
1 files 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]); |
