blob: f1048489e95ee6a0e32a8cda734b6a89e6a61d68 [file] [log] [blame]
Rafael Espindola2afb0e42014-10-21 14:46:17 +00001; RUN: echo create %t.a > %t.mri
Rafael Espindola230b53f2014-10-22 03:10:56 +00002; RUN: echo "addmod \"%p/Inputs/trivial-object-test.elf-x86-64\" " >> %t.mri
Rafael Espindola2afb0e42014-10-21 14:46:17 +00003; RUN: echo save >> %t.mri
4; RUN: echo end >> %t.mri
5
6; RUN: llvm-ar -M < %t.mri
7; RUN: llvm-nm -M %t.a | FileCheck %s
8
9; CHECK: Archive map
10; CHECK-NEXT: main in trivial-object-test.elf-x86-64
11
12; CHECK: trivial-object-test.elf-x86-64:
13; CHECK-NEXT: U SomeOtherFunction
14; CHECK-NEXT: 0000000000000000 T main
15; CHECK-NEXT: U puts
16
Rafael Espindolae5399322014-10-21 21:56:47 +000017; Now test that CREATE overwrites an existing file.
18; RUN: echo create %t.a > %t2.mri
19; RUN: echo addmod %p/Inputs/trivial-object-test2.elf-x86-64 >> %t2.mri
20; RUN: echo save >> %t2.mri
21; RUN: echo end >> %t2.mri
22
23; RUN: llvm-ar -M < %t2.mri
24; RUN: llvm-nm -M %t.a | FileCheck --check-prefix=NEW %s
25
26; NEW: Archive map
27; NEW-NEXT: foo in trivial-object-test2.elf-x86-64
28; NEW-NEXT: main in trivial-object-test2.elf-x86-64
29
30; NEW: trivial-object-test2.elf-x86-64:
31; NEW-NEXT: 0000000000000000 t bar
32; NEW-NEXT: 0000000000000006 T foo
33; NEW-NEXT: 0000000000000016 T main