|
3 | 3 | ## Add [namesz, descsz, type, name, desc] for a build id. |
4 | 4 |
|
5 | 5 | ## Notes should be padded to 8 bytes. |
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 |
| 6 | +# RUN: printf "\004\000\000\000" > %t-miss-padding-note.bin |
| 7 | +# RUN: printf "\007\000\000\000" >> %t-miss-padding-note.bin |
| 8 | +# RUN: printf "\003\000\000\000" >> %t-miss-padding-note.bin |
| 9 | +# RUN: printf "GNU\000" >> %t-miss-padding-note.bin |
| 10 | +# RUN: printf "\014\015\016" >> %t-miss-padding-note.bin |
11 | 11 |
|
12 | 12 | ## The namesz field bit is incorrect. |
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 |
| 13 | +# RUN: printf "\010\000\000\000" > %t-invalid-size-note.bin |
| 14 | +# RUN: printf "\007\000\000\000" >> %t-invalid-size-note.bin |
| 15 | +# RUN: printf "\003\000\000\000" >> %t-invalid-size-note.bin |
| 16 | +# RUN: printf "GNU\000" >> %t-invalid-size-note.bin |
| 17 | +# RUN: printf "\014\015\016\000" >> %t-invalid-size-note.bin |
18 | 18 |
|
19 | 19 | ## Missing type field. |
20 | | -# RUN: printf "\x08\x00\x00\x00" > %t-short-note.bin |
21 | | -# RUN: printf "\x07\x00\x00\x00" >> %t-short-note.bin |
| 20 | +# RUN: printf "\010\000\000\000" > %t-short-note.bin |
| 21 | +# RUN: printf "\007\000\000\000" >> %t-short-note.bin |
22 | 22 |
|
23 | 23 | # RUN: yaml2obj %s -o %t.o |
24 | 24 |
|
|
33 | 33 | # CHECK-SHORT: .note.short data must be either empty or at least 12 bytes long |
34 | 34 |
|
35 | 35 | ## Test compatibility with .note.gnu.property, which has 8-byte alignment. |
36 | | -# RUN: printf "\x04\x00\x00\x00\x40\x00\x00\x00\x05\x00\x00\x00\x47\x4e\x55\x00" > %t-note-gnu-property.bin |
37 | | -# RUN: printf "\x02\x00\x00\xc0\x04\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00" >> %t-note-gnu-property.bin |
38 | | -# RUN: printf "\x01\x80\x01\xc0\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00" >> %t-note-gnu-property.bin |
39 | | -# RUN: printf "\x01\x00\x01\xc0\x04\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00" >> %t-note-gnu-property.bin |
40 | | -# RUN: printf "\x02\x00\x01\xc0\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00" >> %t-note-gnu-property.bin |
| 36 | +# RUN: printf "\004\000\000\000\100\000\000\000\005\000\000\000\107\116\125\000" > %t-note-gnu-property.bin |
| 37 | +# RUN: printf "\002\000\000\300\004\000\000\000\003\000\000\000\000\000\000\000" >> %t-note-gnu-property.bin |
| 38 | +# RUN: printf "\001\200\001\300\004\000\000\000\001\000\000\000\000\000\000\000" >> %t-note-gnu-property.bin |
| 39 | +# RUN: printf "\001\000\001\300\004\000\000\000\013\000\000\000\000\000\000\000" >> %t-note-gnu-property.bin |
| 40 | +# RUN: printf "\002\000\001\300\004\000\000\000\001\000\000\000\000\000\000\000" >> %t-note-gnu-property.bin |
41 | 41 | # RUN: llvm-objcopy --add-section=.note.gnu.property=%t-note-gnu-property.bin %t.o %t-with-note-gnu-property.o |
42 | 42 |
|
43 | 43 | ## Test that verification can be disabled. |
|
0 commit comments