I've done that, and it has been very useful, but hasn't gotten me far enough.
Use grep to reduce the number of hits via regular expressions. This often proves fruitful.
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/BdWcehcHQEY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I've done that, and it has been very useful, but hasn't gotten me far enough.
On Feb 19, 2015 11:59 AM, "thwd" <sedevel...@gmail.com> wrote:
Use grep to reduce the number of hits via regular expressions. This often proves fruitful.
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/BdWcehcHQEY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> Perhaps offsets into the address space occupied once the binary is loaded into memory?
Umm...maybe.
> If this is the case, how would I go about finding the "real" offset (ie, into the binary file)?
I don't remember offhand. I'd have to futz around to figure it out.
http://golang.org/pkg/debug/macho/ might help. There's probably a way
to do it with otool or readelf.
This will give you the contents of the relevant symbol:
otool -s __TEXT __rodata helloworld
The addresses on the left appear to correspond to the right range of
bytes for you. So maybe start there?
$ go tool nm -n -size helloworld | grep 'go.string.*'
abb30 113448 R go.string.*
$ otool -s __TEXT __rodata helloworld | grep -A 5 abb30
00000000000abb30 40 bb 0a 00 00 00 00 00 01 00 00 00 00 00 00 00
00000000000abb40 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000000000abb50 60 bb 0a 00 00 00 00 00 06 00 00 00 00 00 00 00
00000000000abb60 20 56 61 6c 75 65 00 00 00 00 00 00 00 00 00 00
00000000000abb70 80 bb 0a 00 00 00 00 00 07 00 00 00 00 00 00 00
00000000000abb80 20 56 61 6c 75 65 3e 00 00 00 00 00 00 00 00 00
Note that 20 56 61 6c 75 65 3e is " Value>", which seems promising.
Sorry for not having a pat answer offhand. Please post back to the list
if you figure it out.
-josh
If anyone is curious what their handiwork has made possible, here's the final (now released) assignment: http://cs.brown.edu/courses/cs1951e/files/free-trial.pdf
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.