diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2024-09-19 17:06:48 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2024-09-24 09:59:42 -0400 |
commit | 2299dfd4ba96c6852db862f6ec1b96880ecd6c0c (patch) | |
tree | 2cec04c6b5e9a2416697851a0072857f0b0dd5bd /ld/config.in | |
parent | 07d74e51ba8691826b3bc758c2f7d2c1283e4d9b (diff) | |
download | gdb-2299dfd4ba96c6852db862f6ec1b96880ecd6c0c.zip gdb-2299dfd4ba96c6852db862f6ec1b96880ecd6c0c.tar.gz gdb-2299dfd4ba96c6852db862f6ec1b96880ecd6c0c.tar.bz2 |
ld: support --build-id=xx mode
The is patch adds a new ld build-id computation mode, "xx", using
xxhash in its 128-bit mode. The patch prereqs the xxhash-devel
headers being installed, and uses the "all-inlined" model, so no
run-time or link-time library dependence exists.
The xxhash mode performs well, saving roughly 20% of total userspace
run time from an ld job over a 800MB shared library relative to sha1.
128 bits of good hash should be collision-resistant to a number of
distinct binaries that numbers in the 2**32 - 2**64 range, even if not
"crypto" level hash. Confirmations of this are in progress.
ld/configury: add --with-xxhash mode, different from gdb case
because only using it in inline mode
ld/ldbuildid.c: add "xx" mode, #if WITH_XXHASH
ld/NEWS, ld.texi: mention new option
ld/lexsup.c: add enumeration of --build-id STYLES to --help
ld/testsuite/ld-elf/build-id.exp: add test case for 0xHEX case
and conditional for xx case;
also, simply tcl list syntax
https://inbox.sourceware.org/binutils/20240917201509.GB26396@redhat.com/
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Diffstat (limited to 'ld/config.in')
-rw-r--r-- | ld/config.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/config.in b/ld/config.in index f7c9da3..f2aaf0a 100644 --- a/ld/config.in +++ b/ld/config.in @@ -269,6 +269,9 @@ /* Version number of package */ #undef VERSION +/* whether to use inline xxhash */ +#undef WITH_XXHASH + /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER |