return true
}
-// isSameCall reports whether sym is the same as the given named symbol.
-func isSameCall(sym interface{}, name string) bool {
- fn := sym.(*AuxCall).Fn
+// isSameCall reports whether aux is the same as the given named symbol.
+func isSameCall(aux Aux, name string) bool {
+ fn := aux.(*AuxCall).Fn
return fn != nil && fn.String() == name
}
}
// symIsRO reports whether sym is a read-only global.
-func symIsRO(sym interface{}) bool {
+func symIsRO(sym Sym) bool {
lsym := sym.(*obj.LSym)
return lsym.Type == objabi.SRODATA && len(lsym.R) == 0
}
}
// read8 reads one byte from the read-only global sym at offset off.
-func read8(sym interface{}, off int64) uint8 {
+func read8(sym Sym, off int64) uint8 {
lsym := sym.(*obj.LSym)
if off >= int64(len(lsym.P)) || off < 0 {
// Invalid index into the global sym.
}
// read16 reads two bytes from the read-only global sym at offset off.
-func read16(sym interface{}, off int64, byteorder binary.ByteOrder) uint16 {
+func read16(sym Sym, off int64, byteorder binary.ByteOrder) uint16 {
lsym := sym.(*obj.LSym)
// lsym.P is written lazily.
// Bytes requested after the end of lsym.P are 0.
}
// read32 reads four bytes from the read-only global sym at offset off.
-func read32(sym interface{}, off int64, byteorder binary.ByteOrder) uint32 {
+func read32(sym Sym, off int64, byteorder binary.ByteOrder) uint32 {
lsym := sym.(*obj.LSym)
var src []byte
if 0 <= off && off < int64(len(lsym.P)) {
}
// read64 reads eight bytes from the read-only global sym at offset off.
-func read64(sym interface{}, off int64, byteorder binary.ByteOrder) uint64 {
+func read64(sym Sym, off int64, byteorder binary.ByteOrder) uint64 {
lsym := sym.(*obj.LSym)
var src []byte
if 0 <= off && off < int64(len(lsym.P)) {