Feature request: improved build-id generation

John Reiser jreiser@bitwagon.com
Thu Mar 15 04:17:00 GMT 2018

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:
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.

More information about the Binutils mailing list