diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -1241,13 +1241,13 @@ // Optimize the common case. do { size_t size = strlen(p); - pieces.emplace_back(p - s.begin(), xxHash64(StringRef(p, size)), live); + pieces.emplace_back(p - s.begin(), xxh3_64bits(p, size), live); p += size + 1; } while (p != end); } else { do { size_t size = findNull(StringRef(p, end - p), entSize); - pieces.emplace_back(p - s.begin(), xxHash64(StringRef(p, size)), live); + pieces.emplace_back(p - s.begin(), xxh3_64bits(p, size), live); p += size + entSize; } while (p != end); } diff --git a/lld/test/ELF/comment-gc.s b/lld/test/ELF/comment-gc.s --- a/lld/test/ELF/comment-gc.s +++ b/lld/test/ELF/comment-gc.s @@ -5,7 +5,8 @@ # RUN: llvm-objdump -s %t1 | FileCheck %s # CHECK: Contents of section .comment: -# CHECK-NEXT: .LLD 1.0.foo.bar +# CHECK-NEXT: foo..LLD 1.0.bar +# CHECK-NEXT: .{{$}} .ident "foo" diff --git a/lld/test/ELF/compress-debug-sections-zstd.s b/lld/test/ELF/compress-debug-sections-zstd.s --- a/lld/test/ELF/compress-debug-sections-zstd.s +++ b/lld/test/ELF/compress-debug-sections-zstd.s @@ -7,10 +7,10 @@ # CHECK: .debug_str PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 01 MS 0 0 1 # CHECK: Hex dump of section '.debug_str': -# CHECK-NEXT: 0x00000000 756e7369 676e6564 20696e74 00636861 unsigned int.cha -# CHECK-NEXT: 0x00000010 7200756e 7369676e 65642063 68617200 r.unsigned char. -# CHECK-NEXT: 0x00000020 73686f72 7420756e 7369676e 65642069 short unsigned i -# CHECK-NEXT: 0x00000030 6e74006c 6f6e6720 756e7369 676e6564 nt.long unsigned +# CHECK-NEXT: 0x00000000 73686f72 7420756e 7369676e 65642069 short unsigned i +# CHECK-NEXT: 0x00000010 6e740075 6e736967 6e656420 63686172 nt.unsigned char +# CHECK-NEXT: 0x00000020 00636861 72006c6f 6e672075 6e736967 .char.long unsig +# CHECK-NEXT: 0x00000030 6e656420 696e7400 756e7369 676e6564 ned int.unsigned # CHECK-NEXT: 0x00000040 20696e74 00 int. # RUN: ld.lld %t.o -o %t.so -shared --compress-debug-sections=zstd diff --git a/lld/test/ELF/compressed-debug-input.s b/lld/test/ELF/compressed-debug-input.s --- a/lld/test/ELF/compressed-debug-input.s +++ b/lld/test/ELF/compressed-debug-input.s @@ -43,10 +43,10 @@ # DATA-NEXT: AddressAlignment: 1 # DATA-NEXT: EntrySize: 1 # DATA-NEXT: SectionData ( -# DATA-NEXT: 0000: 756E7369 676E6564 20696E74 00636861 |unsigned int.cha| -# DATA-NEXT: 0010: 7200756E 7369676E 65642063 68617200 |r.unsigned char.| -# DATA-NEXT: 0020: 73686F72 7420756E 7369676E 65642069 |short unsigned i| -# DATA-NEXT: 0030: 6E74006C 6F6E6720 756E7369 676E6564 |nt.long unsigned| +# DATA-NEXT: 0000: 73686F72 7420756E 7369676E 65642069 |short unsigned i| +# DATA-NEXT: 0010: 6E740075 6E736967 6E656420 63686172 |nt.unsigned char| +# DATA-NEXT: 0020: 00636861 72006C6F 6E672075 6E736967 |.char.long unsig| +# DATA-NEXT: 0030: 6E656420 696E7400 756E7369 676E6564 |ned int.unsigned| # DATA-NEXT: 0040: 20696E74 00 | int.| # DATA-NEXT: ) # DATA-NEXT: } diff --git a/lld/test/ELF/gc-sections-string.s b/lld/test/ELF/gc-sections-string.s --- a/lld/test/ELF/gc-sections-string.s +++ b/lld/test/ELF/gc-sections-string.s @@ -15,19 +15,19 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: s3 -// CHECK-NEXT: Value: 0x200120 -// CHECK-NEXT: Size: 0 -// CHECK-NEXT: Binding: Local (0x0) -// CHECK-NEXT: Type: Object (0x1) -// CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .rodata (0x1) -// CHECK-NEXT: } -// CHECK-NEXT: Symbol { -// CHECK-NEXT: Name: s1 // CHECK-NEXT: Value: 0x200125 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local (0x0) // CHECK-NEXT: Type: Object (0x1) +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .rodata (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: s1 +// CHECK-NEXT: Value: 0x200120 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local (0x0) +// CHECK-NEXT: Type: Object (0x1) // CHECK-NEXT: Other [ (0x2) // CHECK-NEXT: STV_HIDDEN (0x2) // CHECK-NEXT: ]