Skip to content

Commit 8c355e5

Browse files
authored
internal/elfexec: Fix typos in elfexec.go (google#681)
1 parent d25a53d commit 8c355e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/elfexec/elfexec.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ func GetBuildID(binary io.ReaderAt) ([]byte, error) {
165165
return nil, nil
166166
}
167167

168-
// kernelBase caluclates the base for kernel mappings, which usually require
168+
// kernelBase calculates the base for kernel mappings, which usually require
169169
// special handling. For kernel mappings, tools (like perf) use the address of
170-
// the kernel relocation symbol (_text or _stext) as the mmap start. Additionaly,
170+
// the kernel relocation symbol (_text or _stext) as the mmap start. Additionally,
171171
// for obfuscation, ChromeOS profiles have the kernel image remapped to the 0-th page.
172172
func kernelBase(loadSegment *elf.ProgHeader, stextOffset *uint64, start, limit, offset uint64) (uint64, bool) {
173173
const (
@@ -217,7 +217,7 @@ func kernelBase(loadSegment *elf.ProgHeader, stextOffset *uint64, start, limit,
217217
// GetBase determines the base address to subtract from virtual
218218
// address to get symbol table address. For an executable, the base
219219
// is 0. Otherwise, it's a shared library, and the base is the
220-
// address where the mapping starts. The kernel needs special hanldling.
220+
// address where the mapping starts. The kernel needs special handling.
221221
func GetBase(fh *elf.FileHeader, loadSegment *elf.ProgHeader, stextOffset *uint64, start, limit, offset uint64) (uint64, error) {
222222

223223
if start == 0 && offset == 0 && (limit == ^uint64(0) || limit == 0) {

0 commit comments

Comments
 (0)