diff options
author | Hiroshi Ioka <hirochachacha@gmail.com> | 2017-08-17 09:11:36 +0900 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2017-08-17 23:48:27 +0000 |
commit | 3d124b1a817146ab7800982622b0de5b828f3392 (patch) | |
tree | 7f7454dd9992f2acff75cc4cb7f2673246bb0fa8 /src/debug/macho/macho.go | |
parent | 2763672ecbddec940c6586f43c98bf72a49bcc81 (diff) | |
download | go-3d124b1a817146ab7800982622b0de5b828f3392.tar.gz go-3d124b1a817146ab7800982622b0de5b828f3392.zip |
debug/macho: support LC_RPATH
Updates #21487
Change-Id: Ia549a87a8a305cc80da11ea9bd904402f1a14689
Reviewed-on: https://go-review.googlesource.com/56321
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/debug/macho/macho.go')
-rw-r--r-- | src/debug/macho/macho.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/debug/macho/macho.go b/src/debug/macho/macho.go index 045adb090a..907be31341 100644 --- a/src/debug/macho/macho.go +++ b/src/debug/macho/macho.go @@ -87,6 +87,7 @@ const ( LoadCmdDylib LoadCmd = 0xc // load dylib command LoadCmdDylinker LoadCmd = 0xf // id dylinker command (not load dylinker command) LoadCmdSegment64 LoadCmd = 0x19 + LoadCmdRpath LoadCmd = 0x8000001c ) var cmdStrings = []intName{ @@ -95,6 +96,7 @@ var cmdStrings = []intName{ {uint32(LoadCmdUnixThread), "LoadCmdUnixThread"}, {uint32(LoadCmdDylib), "LoadCmdDylib"}, {uint32(LoadCmdSegment64), "LoadCmdSegment64"}, + {uint32(LoadCmdRpath), "LoadCmdRpath"}, } func (i LoadCmd) String() string { return stringName(uint32(i), cmdStrings, false) } @@ -175,6 +177,13 @@ type ( CompatVersion uint32 } + // A RpathCmd is a Mach-O rpath command. + RpathCmd struct { + Cmd LoadCmd + Len uint32 + Path uint32 + } + // A Thread is a Mach-O thread state command. Thread struct { Cmd LoadCmd |