mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-13 16:18:33 +00:00
47357a1b89
- Avoid confusions with the name :) --HG-- rename : swig/Makefile => r2-bindings/Makefile rename : swig/README => r2-bindings/README rename : swig/autogen.sh => r2-bindings/autogen.sh rename : swig/check-langs.sh => r2-bindings/check-langs.sh rename : swig/config.mk.acr => r2-bindings/config.mk.acr rename : swig/configure => r2-bindings/configure rename : swig/configure.acr => r2-bindings/configure.acr rename : swig/cxx/Makefile => r2-bindings/cxx/Makefile rename : swig/do-swig.sh => r2-bindings/do-swig.sh rename : swig/do-test.sh => r2-bindings/do-test.sh rename : swig/go/Makefile => r2-bindings/go/Makefile rename : swig/go/fixgoswig.sh => r2-bindings/go/fixgoswig.sh rename : swig/go/test-r_bin.go => r2-bindings/go/test-r_bin.go rename : swig/guile/Makefile => r2-bindings/guile/Makefile rename : swig/guile/test-asm.scm => r2-bindings/guile/test-asm.scm rename : swig/guile/test-util.scm => r2-bindings/guile/test-util.scm rename : swig/guile/vapi.patch => r2-bindings/guile/vapi.patch rename : swig/java/Makefile => r2-bindings/java/Makefile rename : swig/java/TestRBin.java => r2-bindings/java/TestRBin.java rename : swig/lua/Makefile => r2-bindings/lua/Makefile rename : swig/lua/test-r_asm.lua => r2-bindings/lua/test-r_asm.lua rename : swig/lua/test-r_bin.lua => r2-bindings/lua/test-r_bin.lua rename : swig/lua/test-r_bp.lua => r2-bindings/lua/test-r_bp.lua rename : swig/lua/test-r_core.lua => r2-bindings/lua/test-r_core.lua rename : swig/perl/Makefile => r2-bindings/perl/Makefile rename : swig/perl/test-r_asm.pl => r2-bindings/perl/test-r_asm.pl rename : swig/perl/test-r_bin.pl => r2-bindings/perl/test-r_bin.pl rename : swig/perl/test-r_bp.pl => r2-bindings/perl/test-r_bp.pl rename : swig/python-config-wrapper => r2-bindings/python-config-wrapper rename : swig/python/Makefile => r2-bindings/python/Makefile rename : swig/python/r_cons.i.experimental => r2-bindings/python/r_cons.i.experimental rename : swig/python/remote.py => r2-bindings/python/remote.py rename : swig/python/test-r2rc.py => r2-bindings/python/test-r2rc.py rename : swig/python/test-r_asm.py => r2-bindings/python/test-r_asm.py rename : swig/python/test-r_bin.py => r2-bindings/python/test-r_bin.py rename : swig/python/test-r_bp.py => r2-bindings/python/test-r_bp.py rename : swig/python/test-r_bp2.py => r2-bindings/python/test-r_bp2.py rename : swig/python/test-r_cons.py => r2-bindings/python/test-r_cons.py rename : swig/python/test-r_core.py => r2-bindings/python/test-r_core.py rename : swig/python/test-r_flags.py => r2-bindings/python/test-r_flags.py rename : swig/python/test-r_hash.py => r2-bindings/python/test-r_hash.py rename : swig/python/test-r_num.py => r2-bindings/python/test-r_num.py rename : swig/python/test-r_util.py => r2-bindings/python/test-r_util.py rename : swig/python/test-ragdiff2.py => r2-bindings/python/test-ragdiff2.py rename : swig/ruby/Makefile => r2-bindings/ruby/Makefile rename : swig/ruby/test-r_bin.rb => r2-bindings/ruby/test-r_bin.rb rename : swig/ruby/test-r_bp.rb => r2-bindings/ruby/test-r_bp.rb rename : swig/ruby/test-r_core.rb => r2-bindings/ruby/test-r_core.rb rename : swig/rules.mk => r2-bindings/rules.mk rename : swig/vapi/libr.deps => r2-bindings/vapi/libr.deps rename : swig/vapi/libr.vapi => r2-bindings/vapi/libr.vapi rename : swig/vapi/r_anal.deps => r2-bindings/vapi/r_anal.deps rename : swig/vapi/r_anal.vapi => r2-bindings/vapi/r_anal.vapi rename : swig/vapi/r_asm.deps => r2-bindings/vapi/r_asm.deps rename : swig/vapi/r_asm.vapi => r2-bindings/vapi/r_asm.vapi rename : swig/vapi/r_bin.deps => r2-bindings/vapi/r_bin.deps rename : swig/vapi/r_bin.vapi => r2-bindings/vapi/r_bin.vapi rename : swig/vapi/r_bp.deps => r2-bindings/vapi/r_bp.deps rename : swig/vapi/r_bp.vapi => r2-bindings/vapi/r_bp.vapi rename : swig/vapi/r_cmd.deps => r2-bindings/vapi/r_cmd.deps rename : swig/vapi/r_cmd.vapi => r2-bindings/vapi/r_cmd.vapi rename : swig/vapi/r_config.vapi => r2-bindings/vapi/r_config.vapi rename : swig/vapi/r_cons.vapi => r2-bindings/vapi/r_cons.vapi rename : swig/vapi/r_core.deps => r2-bindings/vapi/r_core.deps rename : swig/vapi/r_core.vapi => r2-bindings/vapi/r_core.vapi rename : swig/vapi/r_crypto.vapi => r2-bindings/vapi/r_crypto.vapi rename : swig/vapi/r_db.vapi => r2-bindings/vapi/r_db.vapi rename : swig/vapi/r_debug.deps => r2-bindings/vapi/r_debug.deps rename : swig/vapi/r_debug.vapi => r2-bindings/vapi/r_debug.vapi rename : swig/vapi/r_diff.vapi => r2-bindings/vapi/r_diff.vapi rename : swig/vapi/r_flags.deps => r2-bindings/vapi/r_flags.deps rename : swig/vapi/r_flags.vapi => r2-bindings/vapi/r_flags.vapi rename : swig/vapi/r_fs.deps => r2-bindings/vapi/r_fs.deps rename : swig/vapi/r_fs.vapi => r2-bindings/vapi/r_fs.vapi rename : swig/vapi/r_hash.vapi => r2-bindings/vapi/r_hash.vapi rename : swig/vapi/r_io.deps => r2-bindings/vapi/r_io.deps rename : swig/vapi/r_io.vapi => r2-bindings/vapi/r_io.vapi rename : swig/vapi/r_lang.vapi => r2-bindings/vapi/r_lang.vapi rename : swig/vapi/r_lib.vapi => r2-bindings/vapi/r_lib.vapi rename : swig/vapi/r_line.vapi => r2-bindings/vapi/r_line.vapi rename : swig/vapi/r_parse.deps => r2-bindings/vapi/r_parse.deps rename : swig/vapi/r_parse.vapi => r2-bindings/vapi/r_parse.vapi rename : swig/vapi/r_print.vapi => r2-bindings/vapi/r_print.vapi rename : swig/vapi/r_reg.deps => r2-bindings/vapi/r_reg.deps rename : swig/vapi/r_reg.vapi => r2-bindings/vapi/r_reg.vapi rename : swig/vapi/r_search.deps => r2-bindings/vapi/r_search.deps rename : swig/vapi/r_search.vapi => r2-bindings/vapi/r_search.vapi rename : swig/vapi/r_sign.vapi => r2-bindings/vapi/r_sign.vapi rename : swig/vapi/r_socket.vapi => r2-bindings/vapi/r_socket.vapi rename : swig/vapi/r_syscall.vapi => r2-bindings/vapi/r_syscall.vapi rename : swig/vapi/r_util.vapi => r2-bindings/vapi/r_util.vapi rename : swig/vapi/t/Makefile => r2-bindings/vapi/t/Makefile rename : swig/vapi/t/array.vala => r2-bindings/vapi/t/array.vala rename : swig/vapi/t/asm.gs => r2-bindings/vapi/t/asm.gs rename : swig/vapi/t/asm.vala => r2-bindings/vapi/t/asm.vala rename : swig/vapi/t/asmsearch.vala => r2-bindings/vapi/t/asmsearch.vala rename : swig/vapi/t/bin.vala => r2-bindings/vapi/t/bin.vala rename : swig/vapi/t/bintest.vala => r2-bindings/vapi/t/bintest.vala rename : swig/vapi/t/bwdisassemble.vala => r2-bindings/vapi/t/bwdisassemble.vala rename : swig/vapi/t/core.vala => r2-bindings/vapi/t/core.vala rename : swig/vapi/t/db.vala => r2-bindings/vapi/t/db.vala rename : swig/vapi/t/findops.vala => r2-bindings/vapi/t/findops.vala rename : swig/vapi/t/hash.vala => r2-bindings/vapi/t/hash.vala rename : swig/vapi/t/io.vala => r2-bindings/vapi/t/io.vala rename : swig/vapi/t/lang.vala => r2-bindings/vapi/t/lang.vala rename : swig/vapi/t/list.vala => r2-bindings/vapi/t/list.vala rename : swig/vapi/t/list.vapi => r2-bindings/vapi/t/list.vapi rename : swig/vapi/t/plugin.vala => r2-bindings/vapi/t/plugin.vala rename : swig/vapi/t/pluginwrap.c => r2-bindings/vapi/t/pluginwrap.c rename : swig/vapi/t/regs.vala => r2-bindings/vapi/t/regs.vala rename : swig/vapi/t/reloc.vala => r2-bindings/vapi/t/reloc.vala rename : swig/vapi/t/rgot.vala => r2-bindings/vapi/t/rgot.vala rename : swig/vapi/t/sc.vala => r2-bindings/vapi/t/sc.vala rename : swig/vapi/t/search.gs => r2-bindings/vapi/t/search.gs rename : swig/vapi/t/search.vala => r2-bindings/vapi/t/search.vala rename : swig/vapi/t/socket.vala => r2-bindings/vapi/t/socket.vala
24 lines
443 B
Go
24 lines
443 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"fmt"
|
|
"r_bin"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
fmt.Println("Usage:", os.Args[0], "<bin>")
|
|
os.Exit(1)
|
|
}
|
|
b := r_bin.NewRBin()
|
|
b.Load(os.Args[1], false)
|
|
baddr := b.Get_baddr()
|
|
fmt.Println("-> Sections")
|
|
fmt.Printf("baddr=%08x\n", baddr)
|
|
for _, s:= range b.Get_sections() {
|
|
fmt.Printf("offset=0x%08x va=0x%08x size=%05d %s\n",
|
|
s.GetOffset(), baddr+s.GetRva(), s.GetSize(), s.GetName())
|
|
}
|
|
}
|