yaml2obj-elf-rel-noref.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # RUN: yaml2obj -format=elf %s | llvm-readobj -sections -relocations - | FileCheck %s
  2. !ELF
  3. FileHeader: !FielHeader
  4. Class: ELFCLASS32
  5. Data: ELFDATA2LSB
  6. Type: ET_REL
  7. Machine: EM_ARM
  8. Flags: [ EF_ARM_EABI_VER5 ]
  9. Sections:
  10. - Name: .text
  11. Type: SHT_PROGBITS
  12. Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
  13. AddressAlign: 0x0000000000000004
  14. Content: 03308FE0022093E7000052E31EFF2F01
  15. - Name: .rel.text
  16. Type: SHT_REL
  17. Flags: [ SHF_INFO_LINK ]
  18. Link: .symtab
  19. AddressAlign: 0x0000000000000004
  20. Info: .text
  21. Relocations:
  22. - Offset: 0x000000000000000C
  23. Symbol: ''
  24. Type: R_ARM_V4BX
  25. - Name: .data
  26. Type: SHT_PROGBITS
  27. Flags: [ SHF_WRITE, SHF_ALLOC ]
  28. AddressAlign: 0x0000000000000001
  29. Content: ''
  30. - Name: .bss
  31. Type: SHT_NOBITS
  32. Flags: [ SHF_WRITE, SHF_ALLOC ]
  33. AddressAlign: 0x0000000000000001
  34. Size: 0
  35. - Name: .ARM.attributes
  36. Type: SHT_ARM_ATTRIBUTES
  37. AddressAlign: 0x0000000000000001
  38. Content: 4115000000616561626900010B000000060208010901
  39. Symbols:
  40. Local:
  41. - Name: .text
  42. Type: STT_SECTION
  43. Section: .text
  44. - Name: .data
  45. Type: STT_SECTION
  46. Section: .data
  47. - Name: .bss
  48. Type: STT_SECTION
  49. Section: .bss
  50. - Name: '$a'
  51. Section: .text
  52. - Name: call_weak_fn
  53. Type: STT_FUNC
  54. Section: .text
  55. - Name: .ARM.attributes
  56. Type: STT_SECTION
  57. Section: .ARM.attributes
  58. # CHECK: Section {
  59. # CHECK-NEXT: Index: 0
  60. # CHECK: }
  61. # CHECK: Section {
  62. # CHECK-NEXT: Index: 1
  63. # CHECK-NEXT: Name: .text (5)
  64. # CHECK: }
  65. # CHECK-NEXT: Section {
  66. # CHECK-NEXT: Index: 2
  67. # CHECK-NEXT: Name: .rel.text (1)
  68. # CHECK-NEXT: Type: SHT_REL (0x9)
  69. # CHECK-NEXT: Flags [ (0x40)
  70. # CHECK: }
  71. # CHECK: Relocations [
  72. # CHECK-NEXT: Section (2) .rel.text {
  73. # CHECK-NEXT: 0xC R_ARM_V4BX - 0x0
  74. # CHECK-NEXT: }
  75. # CHECK-NEXT: ]