Lines Matching refs:section

11 ## Update the segment section with a regular chunk of data the same size as the section.
12 # RUN: llvm-objcopy --update-section=.in_segment=%t.same %t %t.same.o
13 # RUN: llvm-readobj --section-headers --section-data --program-headers %t.same.o | \
16 ## Show that if we overwrite a given section (.in_segment) with new data, then rewrite it
17 ## back (from the second `--update-section`), then it should be the exact same as the
20 # RUN: llvm-objcopy --update-section=.in_segment=%t.same --update-section=.in_segment=%t.zeros %t %…
23 ## Update segment section with a smaller chunk of data. This will also update the
24 ## section size to the length of the new data written. This does not affect the offset
26 # RUN: llvm-objcopy --update-section=.in_segment=%t.short %t %t.short.o
27 # RUN: llvm-readobj --section-headers --section-data --program-headers %t.short.o | \
30 ## Ensure the data that was in a shortened section within a segment is still retained.
35 ## Add a new section via --add-section, then update it.
36 # RUN: llvm-objcopy --add-section=.added=%t.zeros --update-section=.added=%t.updated \
38 # RUN: llvm-readobj --section-headers --section-data --program-headers %t.updated.o | \
42 # RUN: llvm-objcopy --update-section=.added=%t.updated --add-section=.added=%t.updated \
44 # RUN: llvm-readobj --section-headers --section-data --program-headers %t.updated.o | \
48 # RUN: not llvm-objcopy --update-section=.nosection=%t.same %t %t-err1 2>&1 | \
52 # RUN: not llvm-objcopy --update-section=.nobits_type=%t.same %t %t-err2 2>&1 | \
54 # RUN: not llvm-objcopy --update-section=.null_type=%t.same %t %t-err2 2>&1 | \
57 ## Fail on trying to insert data larger than the existing section.
58 # RUN: not llvm-objcopy --update-section=.in_segment=%t.larger %t %t-err3 2>&1 | \
61 ## But we can insert larger data if the section is NOT part of a segment.
62 # RUN: llvm-objcopy --update-section=.not_in_segment=%t.larger %t %t.larger.o
63 # RUN: llvm-readobj --section-headers --section-data --program-headers %t.larger.o | \
67 ## valid --update-section flag.
68 # RUN: not llvm-objcopy --update-section=.in_segment=%t.larger --update-section=.in_segment=%t.same…
72 # RUN: not llvm-objcopy --update-section %t %t.out 2>&1 | FileCheck %s --check-prefix=MISSING-EQ
73 # RUN: not llvm-objcopy --update-section=.in_segment= %t %t.out 2>&1 | FileCheck %s --check-prefix=…
98 ## The unmodified section is for ensuring that it remains untouched (ie. its
99 ## offset is the same) even when the section before it is shrunk.
154 ## The first 8 bytes are the modified section. The last 8 bytes are the
155 ## unmodified section.
172 # ERR-NO-SECTION: error: {{.*}}section '.nosection' not found
173 # ERR-NOBITS-TYPE: error: {{.*}}section '.nobits_type' cannot be updated because it does not have c…
174 # ERR-NULL-TYPE: error: {{.*}}section '.null_type' cannot be updated because it does not have conte…
175 # ERR-LARGER: error: {{.*}}cannot fit data of size 9 into section '.in_segment' with size 8 that is…
177 # MISSING-EQ: error: bad format for --update-section: missing '='
178 # MISSING-FILE: error: bad format for --update-section: missing file name