|
3 | 3 | ## Add [namesz, descsz, type, name, desc] for a build id.
|
4 | 4 |
|
5 | 5 | ## Notes should be padded on 8 bytes.
|
6 |
| -# RUN: echo -e -n "\x04\x00\x00\x00" > %t-miss-padding-note.bin |
7 |
| -# RUN: echo -e -n "\x07\x00\x00\x00" >> %t-miss-padding-note.bin |
8 |
| -# RUN: echo -e -n "\x03\x00\x00\x00" >> %t-miss-padding-note.bin |
9 |
| -# RUN: echo -e -n "GNU\x00" >> %t-miss-padding-note.bin |
10 |
| -# RUN: echo -e -n "\x0c\x0d\x0e" >> %t-miss-padding-note.bin |
| 6 | +# RUN: printf "\x04\x00\x00\x00" > %t-miss-padding-note.bin |
| 7 | +# RUN: printf "\x07\x00\x00\x00" >> %t-miss-padding-note.bin |
| 8 | +# RUN: printf "\x03\x00\x00\x00" >> %t-miss-padding-note.bin |
| 9 | +# RUN: printf "GNU\x00" >> %t-miss-padding-note.bin |
| 10 | +# RUN: printf "\x0c\x0d\x0e" >> %t-miss-padding-note.bin |
11 | 11 |
|
12 | 12 | ## The namesz field bit is incorrect.
|
13 |
| -# RUN: echo -e -n "\x08\x00\x00\x00" > %t-invalid-size-note.bin |
14 |
| -# RUN: echo -e -n "\x07\x00\x00\x00" >> %t-invalid-size-note.bin |
15 |
| -# RUN: echo -e -n "\x03\x00\x00\x00" >> %t-invalid-size-note.bin |
16 |
| -# RUN: echo -e -n "GNU\x00" >> %t-invalid-size-note.bin |
17 |
| -# RUN: echo -e -n "\x0c\x0d\x0e\x00" >> %t-invalid-size-note.bin |
| 13 | +# RUN: printf "\x08\x00\x00\x00" > %t-invalid-size-note.bin |
| 14 | +# RUN: printf "\x07\x00\x00\x00" >> %t-invalid-size-note.bin |
| 15 | +# RUN: printf "\x03\x00\x00\x00" >> %t-invalid-size-note.bin |
| 16 | +# RUN: printf "GNU\x00" >> %t-invalid-size-note.bin |
| 17 | +# RUN: printf "\x0c\x0d\x0e\x00" >> %t-invalid-size-note.bin |
18 | 18 |
|
19 | 19 | ## Missing type field.
|
20 |
| -# RUN: echo -e -n "\x08\x00\x00\x00" > %t-short-note.bin |
21 |
| -# RUN: echo -e -n "\x07\x00\x00\x00" >> %t-short-note.bin |
| 20 | +# RUN: printf "\x08\x00\x00\x00" > %t-short-note.bin |
| 21 | +# RUN: printf "\x07\x00\x00\x00" >> %t-short-note.bin |
22 | 22 |
|
23 | 23 | # RUN: yaml2obj %s -o %t.o
|
24 | 24 |
|
|
32 | 32 | # RUN: not llvm-objcopy --add-section=.note.short=%t-short-note.bin %t.o %t-with-note.o 2>&1 | FileCheck --check-prefix=CHECK-SHORT %s
|
33 | 33 | # CHECK-SHORT: .note.short data must be either empty or at least 12 bytes long
|
34 | 34 |
|
35 |
| -## test that verification can be disabled |
| 35 | +## Test that verification can be disabled. |
36 | 36 | # RUN: llvm-objcopy --add-section=.note.short=%t-short-note.bin --no-verify-note-sections %t.o %t-with-note.o
|
37 | 37 |
|
38 |
| -## test that last argument has precedence |
| 38 | +## Test that last argument has precedence. |
39 | 39 | # RUN: llvm-objcopy --add-section=.note.short=%t-short-note.bin --verify-note-sections --no-verify-note-sections %t.o %t-with-note.o
|
40 | 40 |
|
41 | 41 | !ELF
|
42 | 42 | FileHeader:
|
43 | 43 | Class: ELFCLASS64
|
44 | 44 | Data: ELFDATA2LSB
|
45 | 45 | Type: ET_REL
|
46 |
| - |
0 commit comments