Convert tests under MC/ELF from macho-dump to llvm-readobj.
[oota-llvm.git] / test / MC / ELF / rename.s
index b004f608cd770176cd67fc5922b56f8715d4b925..8be06424cf2794fef91685af91f9f7116e14bcdb 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump  | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -t | FileCheck %s
 
 // When doing a rename, all the checks for where the relocation should go
 // should be performed with the original symbol. Only if we decide to relocate
@@ -15,32 +15,20 @@ defined3:
 
         .global defined1
 
-// Section 1 is .text
-// CHECK:      # Section 1
-// CHECK-NEXT: (('sh_name', 0x00000006) # '.text'
-// CHECK-NEXT:  ('sh_type', 0x00000001)
-// CHECK-NEXT:  ('sh_flags', 0x00000006)
-// CHECK-NEXT:  ('sh_addr', 0x00000000)
-// CHECK-NEXT:  ('sh_offset', 0x00000040)
-// CHECK-NEXT:  ('sh_size', 0x00000004)
-// CHECK-NEXT:  ('sh_link', 0x00000000)
-// CHECK-NEXT:  ('sh_info', 0x00000000)
-// CHECK-NEXT:  ('sh_addralign', 0x00000004)
-// CHECK-NEXT:  ('sh_entsize', 0x00000000)
-
-// The relocation uses symbol 2
-// CHECK:      # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x00000000)
-// CHECK-NEXT:  ('r_sym', 0x00000002)
-// CHECK-NEXT:  ('r_type', 0x0000000a)
-// CHECK-NEXT:  ('r_addend', 0x0000000000000000)
-
-// Symbol 2 is section 1
-// CHECK:      # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT:  ('st_bind', 0x0)
-// CHECK-NEXT:  ('st_type', 0x3)
-// CHECK-NEXT:  ('st_other', 0x00)
-// CHECK-NEXT:  ('st_shndx', 0x0001)
-// CHECK-NEXT:  ('st_value', 0x0000000000000000)
-// CHECK-NEXT:  ('st_size', 0x0000000000000000)
+// CHECK:        Section {
+// CHECK:          Index:
+// CHECK:          Name: .rela.text
+// CHECK-NEXT:     Type: SHT_RELA (0x4)
+// CHECK-NEXT:     Flags [ (0x0)
+// CHECK-NEXT:     ]
+// CHECK-NEXT:     Address: 0x0
+// CHECK-NEXT:     Offset:
+// CHECK-NEXT:     Size: 24
+// CHECK-NEXT:     Link:
+// CHECK-NEXT:     Info:
+// CHECK-NEXT:     AddressAlignment: 8
+// CHECK-NEXT:     EntrySize: 24
+// CHECK-NEXT:     Relocations [
+// CHECK-NEXT:       0x0 R_X86_64_32 .text 0x0
+// CHECK-NEXT:     ]
+// CHECK-NEXT:   }