Skip to content

Commit

Permalink
remove useless argument for readFuncData
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujhd committed Jul 27, 2024
1 parent 2e27998 commit 4563649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (linker *Linker) addSymbol(name string, symPtr map[string]uintptr) (symbol
}
bytearrayAlignNops(linker.Arch, &linker.Code, funcalign.GetFuncAlign(linker.Arch))
symbol.Func = &obj.Func{}
if err := linker.readFuncData(linker.ObjSymbolMap[name], symbol.Offset, symPtr); err != nil {
if err := linker.readFuncData(linker.ObjSymbolMap[name], symPtr); err != nil {
return nil, err
}
case symkind.SDATA:
Expand Down Expand Up @@ -298,7 +298,7 @@ func (linker *Linker) addSymbol(name string, symPtr map[string]uintptr) (symbol
return symbol, nil
}

func (linker *Linker) readFuncData(symbol *obj.ObjSymbol, codeLen int, symPtr map[string]uintptr) (err error) {
func (linker *Linker) readFuncData(symbol *obj.ObjSymbol, symPtr map[string]uintptr) (err error) {
nameOff := len(linker.Pclntable)
if offset, ok := linker.NameMap[symbol.Name]; !ok {
linker.NameMap[symbol.Name] = len(linker.Pclntable)
Expand Down

0 comments on commit 4563649

Please sign in to comment.