We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
by qyzhai:
8g check.go && 8l -o check check.go objdump -h ~/go/bin/goinstall | awk '/[ ]+[0-9]+/{print $1,$2,"0x"$3,"0x"$4}' | ./check .rodata 813d000-81fe3af overlaps .dynsym 813d2cc-813d3eb .rodata 813d000-81fe3af overlaps .dynstr 813d3ec-813d517 .rodata 813d000-81fe3af overlaps .gnu.version 813d008-813d02b .rodata 813d000-81fe3af overlaps .gnu.version_r 813d02c-813d08b .rodata 813d000-81fe3af overlaps .rel.plt 813d0f4-813d15b .rodata 813d000-81fe3af overlaps .plt 813d1ec-813d2cb .rodata 813d000-81fe3af overlaps .hash 813d08c-813d0f3 .rodata 813d000-81fe3af overlaps .dynamic 813d15c-813d1eb .data 82bb000-82bd847 overlaps .got.plt 82bb260-82bb29f cat check.go //------------check.go----------- package main import ( "fmt" "os" ) type Sectinfo struct { id int name string length int base int } type Sects []Sectinfo func check(base, length, b2, l2 int) bool { if length&l2 == 0 { return false } b1, l1 := base, length if b1 > b2 { b1, l1, b2, l2 = b2, l2, b1, l1 } if b1+l1 > b2 { return true } return false } func main() { var sects Sects for { var s Sectinfo state, err := fmt.Scan(&s.id, &s.name, &s.length, &s.base) if err == os.EOF { break } if err != nil { panic(err) } sects = append(sects, s) _ = state } for i := 1; i < len(sects); i++ { if sects[i].base > 0 { for j := 0; j < i; j++ { if check(sects[i].base, sects[i].length, sects[j].base, sects[j].length) { fmt.Printf("%s %x-%x overlaps %s %x-%x\n", sects[i].name, sects[i].base, sects[i].base+sects[i].length-1, sects[j].name, sects[j].base, sects[j].base+sects[j].length-1) } } } } }
The text was updated successfully, but these errors were encountered:
Comment 1:
Labels changed: added priority-low, removed priority-medium.
Owner changed to @niemeyer.
Status changed to Accepted.
Sorry, something went wrong.
Comment 2:
This issue was closed by revision ba2e3af.
Status changed to Fixed.
No branches or pull requests
by qyzhai:
The text was updated successfully, but these errors were encountered: