1 # RUN: yaml2obj -docnum=1 %s > %t.elf-x86-64
2 # RUN: echo create %t.a > %t.mri
3 # RUN: echo 'addmod "%t.elf-x86-64"' >> %t.mri
4 # RUN: echo save >> %t.mri
5 # RUN: echo end >> %t.mri
16 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
22 Size: 0x0000000000000024
23 - Name: SomeOtherFunction
28 # RUN: llvm-ar -M < %t.mri
29 # RUN: llvm-nm -M %t.a | FileCheck %s
32 # CHECK-NEXT: main in {{.*}}elf-x86-64
34 # CHECK: {{.*}}elf-x86-64:
35 # CHECK-NEXT: U SomeOtherFunction
36 # CHECK-NEXT: 0000000000000000 T main
39 ## Now test that CREATE overwrites an existing file.
40 # RUN: yaml2obj -docnum=2 %s > %t2.elf-x86-64
42 # RUN: echo create %t.a > %t2.mri
43 # RUN: echo addmod %t2.elf-x86-64 >> %t2.mri
44 # RUN: echo save >> %t2.mri
45 # RUN: echo end >> %t2.mri
47 # RUN: llvm-ar -M < %t2.mri
48 # RUN: llvm-nm -M %t.a | FileCheck --check-prefix=NEW %s
51 # NEW-NEXT: foo in {{.*}}2.elf-x86-64
52 # NEW-NEXT: main in {{.*}}2.elf-x86-64
54 # NEW: {{.*}}2.elf-x86-64:
55 # NEW-NEXT: 0000000000000000 t bar
56 # NEW-NEXT: 0000000000000006 T foo
57 # NEW-NEXT: 0000000000000016 T main
68 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
77 Value: 0x0000000000000006
82 Value: 0x0000000000000016