diff --git a/lld/test/ELF/Inputs/resolution.s b/lld/test/ELF/Inputs/resolution.s index 70afb163278fd..828e561dd573b 100644 --- a/lld/test/ELF/Inputs/resolution.s +++ b/lld/test/ELF/Inputs/resolution.s @@ -26,14 +26,8 @@ RegularStrong_with_RegularWeak: .size RegularStrong_with_UndefStrong, 38 .quad RegularStrong_with_UndefStrong -.weak RegularWeak_with_CommonWeak -.comm RegularWeak_with_CommonWeak,39,4 - .comm RegularWeak_with_CommonStrong,40,4 -.weak RegularStrong_with_CommonWeak -.comm RegularStrong_with_CommonWeak,41,4 - .comm RegularStrong_with_CommonStrong,42,4 .weak UndefWeak_with_RegularWeak @@ -56,24 +50,10 @@ UndefStrong_with_RegularStrong: .size UndefWeak_with_UndefWeak, 47 .quad UndefWeak_with_UndefWeak -.weak UndefWeak_with_CommonWeak -.comm UndefWeak_with_CommonWeak,48,4 - .comm UndefWeak_with_CommonStrong,49,4 -.weak UndefStrong_with_CommonWeak -.comm UndefStrong_with_CommonWeak,50,4 - .comm UndefStrong_with_CommonStrong,51,4 -.weak CommonWeak_with_RegularWeak -.size CommonWeak_with_RegularWeak, 52 -CommonWeak_with_RegularWeak: - -.global CommonWeak_with_RegularStrong -.size CommonWeak_with_RegularStrong, 53 -CommonWeak_with_RegularStrong: - .weak CommonStrong_with_RegularWeak .size CommonStrong_with_RegularWeak, 54 CommonStrong_with_RegularWeak: @@ -82,13 +62,6 @@ CommonStrong_with_RegularWeak: .size CommonStrong_with_RegularStrong, 55 CommonStrong_with_RegularStrong: -.weak CommonWeak_with_UndefWeak -.size CommonWeak_with_UndefWeak, 56 -.quad CommonWeak_with_UndefWeak - -.size CommonWeak_with_UndefStrong, 57 -.quad CommonWeak_with_UndefStrong - .weak CommonStrong_with_UndefWeak .size CommonStrong_with_UndefWeak, 58 .quad CommonStrong_with_UndefWeak @@ -96,12 +69,4 @@ CommonStrong_with_RegularStrong: .size CommonStrong_with_UndefStrong, 59 .quad CommonStrong_with_UndefStrong -.weak CommonWeak_with_CommonWeak -.comm CommonWeak_with_CommonWeak,60,4 - -.comm CommonWeak_with_CommonStrong,61,4 - -.weak CommonStrong_with_CommonWeak -.comm CommonStrong_with_CommonWeak,62,4 - .comm CommonStrong_with_CommonStrong,63,4 diff --git a/lld/test/ELF/resolution.s b/lld/test/ELF/resolution.s index b2b2171d69759..43c7ab82c1a68 100644 --- a/lld/test/ELF/resolution.s +++ b/lld/test/ELF/resolution.s @@ -8,42 +8,31 @@ // have the same name. Each symbol has a different size which is used // to see which one was chosen. -// CHECK: Symbol table '.symtab' contains 34 entries: -// CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name -// CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND -// CHECK-NEXT: 1: 0000000000201158 0 NOTYPE GLOBAL DEFAULT 1 _start -// CHECK-NEXT: 2: 0000000000201159 0 NOTYPE WEAK DEFAULT 1 RegularWeak_with_RegularWeak -// CHECK-NEXT: 3: 00000000002011a4 33 NOTYPE GLOBAL DEFAULT 1 RegularWeak_with_RegularStrong -// CHECK-NEXT: 4: 0000000000201159 2 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_RegularWeak -// CHECK-NEXT: 5: 0000000000201159 3 NOTYPE WEAK DEFAULT 1 RegularWeak_with_UndefWeak -// CHECK-NEXT: 6: 0000000000201159 4 NOTYPE WEAK DEFAULT 1 RegularWeak_with_UndefStrong -// CHECK-NEXT: 7: 0000000000201159 5 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_UndefWeak -// CHECK-NEXT: 8: 0000000000201159 6 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_UndefStrong -// CHECK-NEXT: 9: 0000000000201159 7 NOTYPE WEAK DEFAULT 1 RegularWeak_with_CommonWeak -// CHECK-NEXT: 10: 00000000002021ec 40 OBJECT GLOBAL DEFAULT 2 RegularWeak_with_CommonStrong -// CHECK-NEXT: 11: 0000000000201159 9 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_CommonWeak -// CHECK-NEXT: 12: 0000000000201159 10 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_CommonStrong -// CHECK-NEXT: 13: 00000000002011c4 43 NOTYPE WEAK DEFAULT 1 UndefWeak_with_RegularWeak -// CHECK-NEXT: 14: 00000000002011c4 44 NOTYPE GLOBAL DEFAULT 1 UndefWeak_with_RegularStrong -// CHECK-NEXT: 15: 00000000002011c4 45 NOTYPE WEAK DEFAULT 1 UndefStrong_with_RegularWeak -// CHECK-NEXT: 16: 00000000002011c4 46 NOTYPE GLOBAL DEFAULT 1 UndefStrong_with_RegularStrong -// CHECK-NEXT: 17: 0000000000000000 0 NOTYPE WEAK DEFAULT UND UndefWeak_with_UndefWeak -// CHECK-NEXT: 18: 0000000000202214 48 OBJECT WEAK DEFAULT 2 UndefWeak_with_CommonWeak -// CHECK-NEXT: 19: 0000000000202244 49 OBJECT GLOBAL DEFAULT 2 UndefWeak_with_CommonStrong -// CHECK-NEXT: 20: 0000000000202278 50 OBJECT WEAK DEFAULT 2 UndefStrong_with_CommonWeak -// CHECK-NEXT: 21: 00000000002022ac 51 OBJECT GLOBAL DEFAULT 2 UndefStrong_with_CommonStrong -// CHECK-NEXT: 22: 00000000002022e0 20 OBJECT WEAK DEFAULT 2 CommonWeak_with_RegularWeak -// CHECK-NEXT: 23: 00000000002011cc 53 NOTYPE GLOBAL DEFAULT 1 CommonWeak_with_RegularStrong -// CHECK-NEXT: 24: 00000000002022f4 22 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_RegularWeak -// CHECK-NEXT: 25: 00000000002011cc 55 NOTYPE GLOBAL DEFAULT 1 CommonStrong_with_RegularStrong -// CHECK-NEXT: 26: 000000000020230c 24 OBJECT WEAK DEFAULT 2 CommonWeak_with_UndefWeak -// CHECK-NEXT: 27: 0000000000202324 25 OBJECT WEAK DEFAULT 2 CommonWeak_with_UndefStrong -// CHECK-NEXT: 28: 0000000000202340 26 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_UndefWeak -// CHECK-NEXT: 29: 000000000020235c 27 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_UndefStrong -// CHECK-NEXT: 30: 0000000000202378 28 OBJECT WEAK DEFAULT 2 CommonWeak_with_CommonWeak -// CHECK-NEXT: 31: 0000000000202394 61 OBJECT GLOBAL DEFAULT 2 CommonWeak_with_CommonStrong -// CHECK-NEXT: 32: 00000000002023d4 30 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_CommonWeak -// CHECK-NEXT: 33: 00000000002023f4 63 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_CommonStrong +// CHECK: Symbol table '.symtab' contains 23 entries: +// CHECK-NEXT: Size Type Bind Vis Ndx Name +// CHECK-NEXT: 0 NOTYPE LOCAL DEFAULT UND +// CHECK-NEXT: 0 NOTYPE GLOBAL DEFAULT 1 _start +// CHECK-NEXT: 0 NOTYPE WEAK DEFAULT 1 RegularWeak_with_RegularWeak +// CHECK-NEXT: 33 NOTYPE GLOBAL DEFAULT 1 RegularWeak_with_RegularStrong +// CHECK-NEXT: 2 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_RegularWeak +// CHECK-NEXT: 3 NOTYPE WEAK DEFAULT 1 RegularWeak_with_UndefWeak +// CHECK-NEXT: 4 NOTYPE WEAK DEFAULT 1 RegularWeak_with_UndefStrong +// CHECK-NEXT: 5 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_UndefWeak +// CHECK-NEXT: 6 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_UndefStrong +// CHECK-NEXT: 40 OBJECT GLOBAL DEFAULT 2 RegularWeak_with_CommonStrong +// CHECK-NEXT: 10 NOTYPE GLOBAL DEFAULT 1 RegularStrong_with_CommonStrong +// CHECK-NEXT: 43 NOTYPE WEAK DEFAULT 1 UndefWeak_with_RegularWeak +// CHECK-NEXT: 44 NOTYPE GLOBAL DEFAULT 1 UndefWeak_with_RegularStrong +// CHECK-NEXT: 45 NOTYPE WEAK DEFAULT 1 UndefStrong_with_RegularWeak +// CHECK-NEXT: 46 NOTYPE GLOBAL DEFAULT 1 UndefStrong_with_RegularStrong +// CHECK-NEXT: 0 NOTYPE WEAK DEFAULT UND UndefWeak_with_UndefWeak +// CHECK-NEXT: 49 OBJECT GLOBAL DEFAULT 2 UndefWeak_with_CommonStrong +// CHECK-NEXT: 51 OBJECT GLOBAL DEFAULT 2 UndefStrong_with_CommonStrong +// CHECK-NEXT: 22 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_RegularWeak +// CHECK-NEXT: 55 NOTYPE GLOBAL DEFAULT 1 CommonStrong_with_RegularStrong +// CHECK-NEXT: 26 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_UndefWeak +// CHECK-NEXT: 27 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_UndefStrong +// CHECK-NEXT: 63 OBJECT GLOBAL DEFAULT 2 CommonStrong_with_CommonStrong .globl _start _start: @@ -79,18 +68,10 @@ RegularStrong_with_UndefWeak: .size RegularStrong_with_UndefStrong, 6 RegularStrong_with_UndefStrong: -.weak RegularWeak_with_CommonWeak -.size RegularWeak_with_CommonWeak, 7 -RegularWeak_with_CommonWeak: - .weak RegularWeak_with_CommonStrong .size RegularWeak_with_CommonStrong, 8 RegularWeak_with_CommonStrong: -.global RegularStrong_with_CommonWeak -.size RegularStrong_with_CommonWeak, 9 -RegularStrong_with_CommonWeak: - .global RegularStrong_with_CommonStrong .size RegularStrong_with_CommonStrong, 10 RegularStrong_with_CommonStrong: @@ -113,46 +94,19 @@ RegularStrong_with_CommonStrong: .size UndefWeak_with_UndefWeak, 15 .quad UndefWeak_with_UndefWeak -.weak UndefWeak_with_CommonWeak -.size UndefWeak_with_CommonWeak, 16 -.quad UndefWeak_with_CommonWeak - .weak UndefWeak_with_CommonStrong .size UndefWeak_with_CommonStrong, 17 .quad UndefWeak_with_CommonStrong -.size UndefStrong_with_CommonWeak, 18 -.quad UndefStrong_with_CommonWeak - .size UndefStrong_with_CommonStrong, 19 .quad UndefStrong_with_CommonStrong -.weak CommonWeak_with_RegularWeak -.comm CommonWeak_with_RegularWeak,20,4 - -.weak CommonWeak_with_RegularStrong -.comm CommonWeak_with_RegularStrong,21,4 - .comm CommonStrong_with_RegularWeak,22,4 .comm CommonStrong_with_RegularStrong,23,4 -.weak CommonWeak_with_UndefWeak -.comm CommonWeak_with_UndefWeak,24,4 - -.weak CommonWeak_with_UndefStrong -.comm CommonWeak_with_UndefStrong,25,4 - .comm CommonStrong_with_UndefWeak,26,4 .comm CommonStrong_with_UndefStrong,27,4 -.weak CommonWeak_with_CommonWeak -.comm CommonWeak_with_CommonWeak,28,4 - -.weak CommonWeak_with_CommonStrong -.comm CommonWeak_with_CommonStrong,29,4 - -.comm CommonStrong_with_CommonWeak,30,4 - .comm CommonStrong_with_CommonStrong,31,4