[lld] a290db3 - [ELF] --build-id=fast: switch to xxh3_64bits
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 11:37:47 PDT 2023
Author: Fangrui Song
Date: 2023-07-19T11:37:42-07:00
New Revision: a290db3af14d8eb792e72555832c342f85b9579b
URL: https://github.com/llvm/llvm-project/commit/a290db3af14d8eb792e72555832c342f85b9579b
DIFF: https://github.com/llvm/llvm-project/commit/a290db3af14d8eb792e72555832c342f85b9579b.diff
LOG: [ELF] --build-id=fast: switch to xxh3_64bits
Added:
Modified:
lld/ELF/Writer.cpp
lld/test/ELF/build-id.s
Removed:
################################################################################
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index ac4d6b711cfc6c..368c9aabceae81 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -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:
diff --git a/lld/test/ELF/build-id.s b/lld/test/ELF/build-id.s
index 05a5e8d61f92e6..844880937b09f5 100644
--- a/lld/test/ELF/build-id.s
+++ b/lld/test/ELF/build-id.s
@@ -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.
More information about the llvm-commits
mailing list