Skip to content

cmd/gc, cmd/ld: use content-addressable symbols for gclocals and gcargs #7568

@josharian

Description

@josharian
Poking through gc-produced binaries, there are a fair number of small symbols that
represent the same data, particularly among gclocals.* and gcargs.*. Using dupok
content-addressable symbols (like ARM does for floats and doubles, e.g. $f32.00000000)
would allow many of these symbols to be gracefully collapsed, resulting in a smaller
binary.

It might even be worth having a general content-addressable symbol shared across all
read-only users of small symbols.

This might want to be controlled by a compiler flag, so that it is easy to separate back
out the symbols as needed for debugging the liveness analysis, etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions