From 45636494ada53494464baf7ce169d811731b6949 Mon Sep 17 00:00:00 2001 From: pkujhd Date: Sat, 27 Jul 2024 18:21:59 +0800 Subject: [PATCH] remove useless argument for readFuncData --- ld.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld.go b/ld.go index 9077047..f11a627 100644 --- a/ld.go +++ b/ld.go @@ -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: @@ -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)