Skip to content

Commit

Permalink
[ELF] --build-id=fast: switch to xxh3_64bits
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jul 19, 2023
1 parent eabaf3b commit a290db3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lld/ELF/Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2993,7 +2993,7 @@ template <class ELFT> void Writer<ELFT>::writeBuildId() {
switch (config->buildId) {
case BuildIdKind::Fast:
computeHash(output, input, [](uint8_t *dest, ArrayRef<uint8_t> arr) {
write64le(dest, xxHash64(arr));
write64le(dest, xxh3_64bits(arr));
});
break;
case BuildIdKind::Md5:
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/build-id.s
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _start:
# DEFAULT: Contents of section .note.test:
# DEFAULT: Contents of section .note.gnu.build-id:
# DEFAULT-NEXT: 04000000 08000000 03000000 474e5500 ............GNU.
# DEFAULT-NEXT: 7e8ddeff 3ed41fa3
# DEFAULT-NEXT: 630bc2f5 a2584763

# MD5: Contents of section .note.gnu.build-id:
# MD5-NEXT: 04000000 10000000 03000000 474e5500 ............GNU.
Expand Down

0 comments on commit a290db3

Please sign in to comment.