diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2018-04-12 16:35:51 +0200 |
|---|---|---|
| committer | Tobias Klauser <tobias.klauser@gmail.com> | 2018-04-18 13:19:31 +0000 |
| commit | 96f6cc15949c27df4fe5df3c5ac9952f37543333 (patch) | |
| tree | 5647d20a6065f4deb612f47b60d7fa192910dd5d /src/debug/elf/file_test.go | |
| parent | 47435b1da1e2a5698d1cfddc0eff889e4fdb6111 (diff) | |
| download | go-96f6cc15949c27df4fe5df3c5ac9952f37543333.tar.xz | |
debug/elf: add riscv64 relocations
Based on the code from https://github.com/riscv/riscv-go/ originally
written by Amol Bhave.
Change-Id: I8d5377096d4ff8b198dadb630511f9a0347f9797
Reviewed-on: https://go-review.googlesource.com/107339
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/debug/elf/file_test.go')
| -rw-r--r-- | src/debug/elf/file_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/debug/elf/file_test.go b/src/debug/elf/file_test.go index ce27abb064..880b66e797 100644 --- a/src/debug/elf/file_test.go +++ b/src/debug/elf/file_test.go @@ -568,6 +568,25 @@ var relocationTests = []relocationTest{ }, }, { + "testdata/go-relocation-test-gcc720-riscv64.obj", + []relocationTestEntry{ + {0, &dwarf.Entry{ + Offset: 0xb, + Tag: dwarf.TagCompileUnit, + Children: true, + Field: []dwarf.Field{ + {Attr: dwarf.AttrProducer, Val: "GNU C11 7.2.0 -march=rv64imafdc -mabi=lp64d -g -gdwarf-2", Class: dwarf.ClassString}, + {Attr: dwarf.AttrLanguage, Val: int64(12), Class: dwarf.ClassConstant}, + {Attr: dwarf.AttrName, Val: "hello.c", Class: dwarf.ClassString}, + {Attr: dwarf.AttrCompDir, Val: "/tmp", Class: dwarf.ClassString}, + {Attr: dwarf.AttrLowpc, Val: uint64(0x0), Class: dwarf.ClassAddress}, + {Attr: dwarf.AttrHighpc, Val: uint64(0x2c), Class: dwarf.ClassAddress}, + {Attr: dwarf.AttrStmtList, Val: int64(0), Class: dwarf.ClassLinePtr}, + }, + }}, + }, + }, + { "testdata/go-relocation-test-clang-x86.obj", []relocationTestEntry{ {0, &dwarf.Entry{ |
