]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, cmd/link: support for DWARF file reference relocations
authorThan McIntosh <thanm@google.com>
Tue, 24 Oct 2017 20:08:46 +0000 (16:08 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 27 Oct 2017 17:53:52 +0000 (17:53 +0000)
commitb52b77cb953430b76242724394bb66e79fda9f10
tree3252a3aa830d2047fdbea93bdee6d7b932aa61b5
parenta93bc1d26e70cf471ad8f7580333213c67b85313
cmd/compile, cmd/link: support for DWARF file reference relocations

New relocation flavor R_DWARFFILEREF, to be applied to DWARF attribute
values that correspond to file references (ex: DW_AT_decl_file,
DW_AT_call_file). The LSym for this relocation is the file itself; the
linker replaces the relocation target with the index of the specified
file in the line table's file section.

Note: for testing purposes this patch changes the DWARF function
subprogram DIE abbrev to include DW_AT_decl_file (allowed by DWARF
but not especially useful) so as to have a way to test this
functionality. This attribute will be removed once there are other
file reference attributes (coming as part of inlining support).

Change-Id: Icf676beb60fcc33f06d78e747ef717532daaa3ba
Reviewed-on: https://go-review.googlesource.com/73330
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/internal/dwarf/dwarf.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/objabi/reloctype.go
src/cmd/internal/objabi/reloctype_string.go
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/dwarf_test.go
src/cmd/link/internal/x86/asm.go