Skip to content

cmd/link: ELF external linking puts all symbols in dynamic symbol table #53579

@ianlancetaylor

Description

@ianlancetaylor

Currently external linking on ELF systems passes -rdynamic to the external linker, which tells it to put all exported symbols into the dynamic symbol table. This is unnecessary in the normal case. It wastes space in the executable, and effectively disables garbage collection in the external linker. We should instead only export symbols that may need to be exported.

I have a patch for this which we can try for the 1.20 release.

Metadata

Metadata

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions