This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Feature request: improved build-id generation
On 03/14/2018 10:36 UTC, Andy Lutomirski wrote:
I would like to request a new variant.
--build-id=sha512256: The build-id is
HMAC-SHA512/256("build-id-sha512256", relevant parts of output) If
one of more --build-id-key options are specified, then it's
HMAC-SHA512/256("build-id-sha512256-keyed" + ("-" || decimal length of
key || key) for each --build-id-key option, output).
I suggest that /bin/ld accept any number of command-line parameters like:
--note-proto=n_namesz,n_descsz,n_type,"name"
where n_namesz, n_descsz, and n_type are numbers, and "name" is a string
that ld zero-pads to length round_up(n_namesz, 4). /bin/ld appends to
the PT_NOTE segment, using round_up(n_descsz, 4) bytes of zero as the value.
Then a post-processor can find that Note, and change it to a different
n_type,"name",value as desired.