]> Cypherpunks repositories - gostls13.git/commit
debug/plan9obj, cmd/addr2line: on Plan 9 use a.out header
authorAram Hăvărneanu <aram@mgk.ro>
Wed, 9 Jul 2014 10:33:13 +0000 (12:33 +0200)
committerAram Hăvărneanu <aram@mgk.ro>
Wed, 9 Jul 2014 10:33:13 +0000 (12:33 +0200)
commit0a2083edd7a31f2248da1cdaca6e39466a9fb05b
treedab5fc3df9849f9964098fd340801543da96db7d
parentfa113cf767ac330b836966c4e75b6b21566da095
debug/plan9obj, cmd/addr2line: on Plan 9 use a.out header
size instead of abusing text symbol

cmd/addr2line needs to know the virtual address of the start
of the text segment (load address plus header size). For
this, it used the text symbol added by the linker. This is
wrong on amd64. Header size is 40 bytes, not 32 like on 386
and arm. Function alignment is 16 bytes causing text to be
at 0x200030.

debug/plan9obj now exports both the load address and the
header size; cmd/addr2line uses this new information and
doesn't rely on text anymore.

LGTM=0intro
R=0intro, gobot, ality
CC=ality, golang-codereviews, jas, mischief
https://golang.org/cl/106460044
src/cmd/addr2line/main.go
src/pkg/debug/plan9obj/file.go