• Michael Hudson-Doyle's avatar
    cmd/link/internal/ld: put abi hash into a note · 65518032
    Michael Hudson-Doyle authored
    This makes for a more stable API for tools (including cmd/link itself) to
    extract the abi hash from a shared library and makes it possible at all for a
    library that has had the local symbol table removed.
    
    The existing note-writing code only supports writing notes into the very start
    of the object file so they are easy to find in core dumps. This doesn't apply
    to the "go" notes and means that all notes have to fit into a fixed size
    budget. That's annoying now we have more notes (and the next CL will add
    another one) so this does a little bit of work to make adding notes that do not
    have to go at the start of the file easier and moves the writing of the package
    list note over to that mechanism, which lets me revert a hack that increased
    the size budget mentioned above for -buildmode=shared builds.
    
    Change-Id: I6077a68d395c8a2bc43dec8506e73c71ef77d9b9
    Reviewed-on: https://go-review.googlesource.com/10375Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    65518032
symtab.go 14.3 KB