In the source code of the Go linker (cmd/link/internal/ld/lib.go), the function “loadlib” loads libraries and parses the object files of each library.
However, I have noticed that there are two strange duplicated loops here, and after reading the relevant code, it seems that the first loop can be removed.