]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: put abi hash into a note
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 25 May 2015 01:59:08 +0000 (13:59 +1200)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 May 2015 04:48:29 +0000 (04:48 +0000)
commit65518032b946bbb640cf1e3d5e66f537642503ed
tree7e2a32295d6865ab9a735e35f5f732c451e1446a
parent9262e2183bd1a6d8489f0d597053af76194ede00
cmd/link/internal/ld: put abi hash into a note

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/10375
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testshared/shared_test.go
src/cmd/link/internal/amd64/obj.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/symtab.go