Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/link: suppress symbol table on Mach-O when -s
Currently, on Mach-O, we don't strip the symbol table even the -s flag is set. This CL makes it suppress the symbol table, as documented. On Mach-O, even with -s, we still need to keep symbols that are dynamically exported or referenced symbol. Otherwise the dynamic linker cannot resolve them and the binary doesn't run. (Interestingly, for a PIE binary it is okay to strip the symbol table entirely. We keep the dynamic symbols for consistency. And this is also in consistent with what the system "strip" command does.) Change-Id: I39c572553fe0215ae3bdf5349bf2bab7205fbdc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/492744 Reviewed-by: Than McIntosh <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
- Loading branch information