代码拉取完成,页面将自动刷新
package linutil
import (
"bytes"
"encoding/binary"
)
const (
_AT_NULL = 0
_AT_ENTRY = 9
)
// EntryPointFromAuxv searches the elf auxiliary vector for the entry point
// address.
// For a description of the auxiliary vector (auxv) format see:
// System V Application Binary Interface, AMD64 Architecture Processor
// Supplement, section 3.4.3.
// System V Application Binary Interface, Intel386 Architecture Processor
// Supplement (fourth edition), section 3-28.
func EntryPointFromAuxv(auxv []byte, ptrSize int) uint64 {
rd := bytes.NewBuffer(auxv)
for {
tag, err := readUintRaw(rd, binary.LittleEndian, ptrSize)
if err != nil {
return 0
}
val, err := readUintRaw(rd, binary.LittleEndian, ptrSize)
if err != nil {
return 0
}
switch tag {
case _AT_NULL:
return 0
case _AT_ENTRY:
return val
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。