Projects STRLCPY GoReSym Commits 78e960f3
🤬
  • ■ ■ ■ ■ ■ ■
    buildinfo/buildinfo.go
    skipped 260 lines
    261 261   return s.Addr
    262 262   }
    263 263   }
     264 + 
    264 265   for _, p := range x.f.Progs {
    265  - if p.Type == elf.PT_LOAD && p.Flags&(elf.PF_X|elf.PF_W) == elf.PF_W {
     266 + flags := elf.ProgFlag(elf.PF_R | elf.PF_W)
     267 + if p.Type == elf.PT_LOAD && (p.Flags&flags) == flags {
    266 268   return p.Vaddr
    267 269   }
    268 270   }
    skipped 48 lines
    317 319   IMAGE_SCN_ALIGN_32BYTES = 0x600000
    318 320   )
    319 321   for _, sect := range x.f.Sections {
    320  - if sect.VirtualAddress != 0 && sect.Size != 0 &&
    321  - sect.Characteristics&^IMAGE_SCN_ALIGN_32BYTES == IMAGE_SCN_CNT_INITIALIZED_DATA|IMAGE_SCN_MEM_READ|IMAGE_SCN_MEM_WRITE {
     322 + flags := uint32(IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE)
     323 + if sect.VirtualAddress != 0 && (sect.Characteristics&flags) == flags {
    322 324   return uint64(sect.VirtualAddress) + x.imageBase()
    323 325   }
    324 326   }
    skipped 72 lines
    397 399  }
    398 400   
    399 401  func (x *xcoffExe) DataStart() uint64 {
    400  - return x.f.SectionByType(xcoff.STYP_DATA).VirtualAddress
     402 + if s := x.f.SectionByType(xcoff.STYP_DATA); s != nil {
     403 + return s.VirtualAddress
     404 + }
     405 + return 0
    401 406  }
    402 407   
Please wait...
Page is in error, reload to recover