mri-addmod.test 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. ; RUN: echo create %t.a > %t.mri
  2. ; RUN: echo "addmod \"%p/Inputs/trivial-object-test.elf-x86-64\" " >> %t.mri
  3. ; RUN: echo save >> %t.mri
  4. ; RUN: echo end >> %t.mri
  5. ; RUN: llvm-ar -M < %t.mri
  6. ; RUN: llvm-nm -M %t.a | FileCheck %s
  7. ; CHECK: Archive map
  8. ; CHECK-NEXT: main in trivial-object-test.elf-x86-64
  9. ; CHECK: trivial-object-test.elf-x86-64:
  10. ; CHECK-NEXT: U SomeOtherFunction
  11. ; CHECK-NEXT: 0000000000000000 T main
  12. ; CHECK-NEXT: U puts
  13. ; Now test that CREATE overwrites an existing file.
  14. ; RUN: echo create %t.a > %t2.mri
  15. ; RUN: echo addmod %p/Inputs/trivial-object-test2.elf-x86-64 >> %t2.mri
  16. ; RUN: echo save >> %t2.mri
  17. ; RUN: echo end >> %t2.mri
  18. ; RUN: llvm-ar -M < %t2.mri
  19. ; RUN: llvm-nm -M %t.a | FileCheck --check-prefix=NEW %s
  20. ; NEW: Archive map
  21. ; NEW-NEXT: foo in trivial-object-test2.elf-x86-64
  22. ; NEW-NEXT: main in trivial-object-test2.elf-x86-64
  23. ; NEW: trivial-object-test2.elf-x86-64:
  24. ; NEW-NEXT: 0000000000000000 t bar
  25. ; NEW-NEXT: 0000000000000006 T foo
  26. ; NEW-NEXT: 0000000000000016 T main