objdump-relocations.test 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.coff-i386 \
  2. RUN: | FileCheck %s -check-prefix COFF-i386
  3. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.coff-x86-64 \
  4. RUN: | FileCheck %s -check-prefix COFF-x86-64
  5. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-i386 \
  6. RUN: | FileCheck %s -check-prefix ELF-i386
  7. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-x86-64 \
  8. RUN: | FileCheck %s -check-prefix ELF-x86-64
  9. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-hexagon \
  10. RUN: | FileCheck %s -check-prefix ELF-hexagon
  11. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-mips64el \
  12. RUN: | FileCheck %s -check-prefix ELF-MIPS64EL
  13. RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-mipsel \
  14. RUN: | FileCheck %s -check-prefix ELF-MIPSEL
  15. RUN: llvm-objdump -r %p/Inputs/relocations.elf-x86-64 \
  16. RUN: | FileCheck %s -check-prefix ELF-complex-x86-64
  17. COFF-i386: .text
  18. COFF-i386: IMAGE_REL_I386_DIR32 L_.str
  19. COFF-i386: IMAGE_REL_I386_REL32 _puts
  20. COFF-i386: IMAGE_REL_I386_REL32 _SomeOtherFunction
  21. COFF-x86-64: .text
  22. COFF-x86-64: IMAGE_REL_AMD64_REL32 L.str
  23. COFF-x86-64: IMAGE_REL_AMD64_REL32 puts
  24. COFF-x86-64: IMAGE_REL_AMD64_REL32 SomeOtherFunction
  25. ELF-i386: .text
  26. ELF-i386: R_386_32 .rodata.str1.1
  27. ELF-i386: R_386_PC32 puts
  28. ELF-i386: R_386_PC32 SomeOtherFunction
  29. ELF-x86-64: .text
  30. ELF-x86-64: R_X86_64_32S .rodata.str1.1
  31. ELF-x86-64: R_X86_64_PC32 puts
  32. ELF-x86-64: R_X86_64_PC32 SomeOtherFunction
  33. ELF-hexagon: .text
  34. ELF-hexagon: R_HEX_GOTREL_HI16 .main
  35. ELF-hexagon: R_HEX_GOTREL_LO16 .main
  36. ELF-hexagon: R_HEX_HI16 puts
  37. ELF-hexagon: R_HEX_LO16 puts
  38. ELF-hexagon: R_HEX_B15_PCREL testf
  39. ELF-hexagon: R_HEX_B22_PCREL puts
  40. // Note: this file was produced with gas to make sure we don't end up in a
  41. // situation where LLVM produces and accepts a broken file.
  42. ELF-MIPS64EL: .data
  43. ELF-MIPS64EL: R_MIPS_64/R_MIPS_NONE/R_MIPS_NONE zed
  44. ELF-MIPSEL: .rel.text
  45. ELF-MIPSEL: R_MIPS_HI16 _gp_disp
  46. ELF-MIPSEL: R_MIPS_LO16 _gp_disp
  47. ELF-MIPSEL: R_MIPS_GOT16 $.str
  48. ELF-MIPSEL: R_MIPS_LO16 $.str
  49. ELF-MIPSEL: R_MIPS_CALL16 puts
  50. ELF-MIPSEL: R_MIPS_CALL16 SomeOtherFunction
  51. ELF-complex-x86-64: .text
  52. ELF-complex-x86-64-NEXT: R_X86_64_8 .data-4
  53. ELF-complex-x86-64-NEXT: R_X86_64_16 .data-4
  54. ELF-complex-x86-64-NEXT: R_X86_64_32 .data-4
  55. ELF-complex-x86-64-NEXT: R_X86_64_32S .data-4
  56. ELF-complex-x86-64-NEXT: R_X86_64_64 .data-4
  57. ELF-complex-x86-64-NEXT: R_X86_64_PC32 .data-4-P
  58. ELF-complex-x86-64-NEXT: R_X86_64_32 .data+0
  59. ELF-complex-x86-64-NEXT: R_X86_64_32 .data+4