diff options
| author | Shulhan <m.shulhan@gmail.com> | 2024-10-26 00:48:33 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2026-02-03 18:04:30 +0700 |
| commit | 011e40da85bddf83fee0ded83cb9115b7a88b3d4 (patch) | |
| tree | 355cc352e66fc64ce94f17658c31e699aa798bb1 /src/cmd/internal/objfile/xcoff.go | |
| parent | 85232e51b20971e0d211b25fa3aa412bc7987404 (diff) | |
| download | go-011e40da85bddf83fee0ded83cb9115b7a88b3d4.tar.xz | |
all: prealloc slice with possible minimum capabilities
Diffstat (limited to 'src/cmd/internal/objfile/xcoff.go')
| -rw-r--r-- | src/cmd/internal/objfile/xcoff.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/objfile/xcoff.go b/src/cmd/internal/objfile/xcoff.go index 85928621f1..f1dc5dafa3 100644 --- a/src/cmd/internal/objfile/xcoff.go +++ b/src/cmd/internal/objfile/xcoff.go @@ -27,7 +27,7 @@ func openXcoff(r io.ReaderAt) (rawFile, error) { } func (f *xcoffFile) symbols() ([]Sym, error) { - var syms []Sym + syms := make([]Sym, 0, len(f.xcoff.Symbols)) for _, s := range f.xcoff.Symbols { const ( N_UNDEF = 0 // An undefined (extern) symbol |
