| /llvm-project-15.0.7/llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/ |
| H A D | BUILD.gn | 8 visibility = [ ":llvm-objcopy" ] 13 visibility = [ ":llvm-objcopy" ] 18 visibility = [ ":llvm-objcopy" ] 23 visibility = [ ":llvm-objcopy" ] 34 "objcopy", 46 deps = [ ":llvm-objcopy" ] 47 source = "llvm-objcopy" 52 # //:llvm-objcopy depends on this symlink target, see comment in //BUILD.gn. 54 deps = [ ":llvm-objcopy" ] 60 driver_executable("llvm-objcopy") { [all …]
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/ELF/ |
| H A D | ihex-reader.test | 3 # RUN: llvm-objcopy -O ihex %t %t.hex 4 # RUN: llvm-objcopy -I ihex -O elf32-i386 %t.hex %t2 64 # RUN: llvm-objcopy -O binary --only-section=.text %t %t.text 65 # RUN: llvm-objcopy -O binary --only-section=.sec1 %t2 %t2.sec1 67 # RUN: llvm-objcopy -O binary --only-section=.data %t %t.data 68 # RUN: llvm-objcopy -O binary --only-section=.sec2 %t2 %t2.sec2 70 # RUN: llvm-objcopy -O binary --only-section=.data2 %t %t.data2 71 # RUN: llvm-objcopy -O binary --only-section=.sec3 %t2 %t2.sec3 73 # RUN: llvm-objcopy -O binary --only-section=.data3 %t %t.data3 74 # RUN: llvm-objcopy -O binary --only-section=.sec4 %t2 %t2.sec4 [all …]
|
| H A D | change-entry-point.test | 4 # RUN: llvm-objcopy --set-start 0x1000 %t %t2 6 # RUN: llvm-objcopy --set-start 4096 %t %t3 8 # RUN: llvm-objcopy --set-start 0x100000000 %t %t4 10 # RUN: not llvm-objcopy --set-start -123 %t %t5 2>&1 | FileCheck %s --check-prefix=SET-ERR 13 # RUN: llvm-objcopy --change-start 0x50 %t %t6 15 # RUN: llvm-objcopy --change-start 0x100000000 %t %t7 17 # RUN: llvm-objcopy --change-start -128 %t %t8 19 # RUN: llvm-objcopy --change-start -4353 %t %t9 21 # RUN: llvm-objcopy --change-start -0x1101 %t %t10 30 # RUN: llvm-objcopy --change-start 0x150 --set-start 0x1000 %t %t13 [all …]
|
| H A D | wildcard-flags.test | 2 ## as well as verifying all the relevant flags in llvm-objcopy and llvm-strip 9 # RUN: not llvm-objcopy --regex --wildcard %t.o %t.err.o 2>&1 \ 19 # RUN: llvm-objcopy --strip-all --keep-section='.f*' %t.o %t.ksec.1.o 26 # RUN: llvm-objcopy --strip-all --only-section='.f*' %t.o %t.osec.1.o 42 # RUN: llvm-objcopy --globalize-symbol='*' %t.o %t.globsym.1.o 47 # RUN: llvm-objcopy -w --globalize-symbol='*' %t.o %t.globsym.2.o 53 # RUN: llvm-objcopy --discard-all --keep-symbol='f*' %t.o %t.ksym.1.o 94 # RUN: llvm-objcopy --strip-symbol='f*' %t.o %t.stripsym.1.o 100 # RUN: llvm-objcopy -w --strip-symbol='f*' %t.o %t.stripsym.3.o 107 # RUN: llvm-objcopy --strip-symbols=%t-fstar.txt %t.o %t.stripsym.5.o [all …]
|
| H A D | dump-section.test | 2 # RUN: llvm-objcopy -O binary -j .text %t %t2 3 # RUN: llvm-objcopy -O binary --only-section .text %t %t3 4 # RUN: llvm-objcopy --dump-section .text=%t4 %t %t5 5 # RUN: llvm-objcopy --dump-section .foo=%t6 %t %t7 6 # RUN: not llvm-objcopy --dump-section .bar=%t8 %t %t9 2>&1 | FileCheck %s --check-prefix=NOBITS -D… 7 # RUN: llvm-objcopy --dump-section .text=%t10 --dump-section .foo=%t11 %t /dev/null 8 # RUN: llvm-objcopy --dump-section .empty=%t.empty %t /dev/null 56 # RUN: not llvm-objcopy --dump-section =/dev/null %t /dev/null 2>&1 | \ 58 # RUN: not llvm-objcopy --dump-section .missing=/dev/null %t /dev/null 2>&1 | \ 63 # RUN: not llvm-objcopy --dump-section .text %t /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2 [all …]
|
| H A D | rename-section-flag-preserved.test | 4 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t %t.alloc 6 # RUN: llvm-objcopy --rename-section=.foo=.bar,load %t %t.load 8 # RUN: llvm-objcopy --rename-section=.foo=.bar,noload %t %t.noload 10 # RUN: llvm-objcopy --rename-section=.foo=.bar,readonly %t %t.readonly 12 # RUN: llvm-objcopy --rename-section=.foo=.bar,debug %t %t.debug 14 # RUN: llvm-objcopy --rename-section=.foo=.bar,code %t %t.code 16 # RUN: llvm-objcopy --rename-section=.foo=.bar,data %t %t.data 18 # RUN: llvm-objcopy --rename-section=.foo=.bar,rom %t %t.rom 22 # RUN: llvm-objcopy --rename-section=.foo=.bar,merge %t %t.merge 26 # RUN: llvm-objcopy --rename-section=.foo=.bar,share %t %t.share [all …]
|
| H A D | set-section-flags-preserved.test | 4 # RUN: llvm-objcopy --set-section-flags=.foo=alloc %t %t.alloc 6 # RUN: llvm-objcopy --set-section-flags=.foo=load %t %t.load 8 # RUN: llvm-objcopy --set-section-flags=.foo=noload %t %t.noload 10 # RUN: llvm-objcopy --set-section-flags=.foo=readonly %t %t.readonly 12 # RUN: llvm-objcopy --set-section-flags=.foo=debug %t %t.debug 14 # RUN: llvm-objcopy --set-section-flags=.foo=code %t %t.code 16 # RUN: llvm-objcopy --set-section-flags=.foo=data %t %t.data 18 # RUN: llvm-objcopy --set-section-flags=.foo=rom %t %t.rom 22 # RUN: llvm-objcopy --set-section-flags=.foo=merge %t %t.merge 24 # RUN: llvm-objcopy --set-section-flags=.foo=strings %t %t.strings [all …]
|
| H A D | rename-section-flag.test | 4 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc \ 7 # RUN: llvm-objcopy --rename-section=.foo=.bar,load \ 10 # RUN: llvm-objcopy --rename-section=.foo=.bar,noload \ 13 # RUN: llvm-objcopy --rename-section=.foo=.bar,readonly \ 16 # RUN: llvm-objcopy --rename-section=.foo=.bar,exclude \ 19 # RUN: llvm-objcopy --rename-section=.foo=.bar,debug \ 22 # RUN: llvm-objcopy --rename-section=.foo=.bar,code \ 25 # RUN: llvm-objcopy --rename-section=.foo=.bar,data \ 28 # RUN: llvm-objcopy --rename-section=.foo=.bar,rom \ 34 # RUN: llvm-objcopy --rename-section=.foo=.bar,merge \ [all …]
|
| H A D | binary-output-target.test | 3 # RUN: llvm-objcopy -I binary -O elf64-littleaarch64 %t.txt %t.aarch64.o 6 # RUN: llvm-objcopy -I binary -O elf32-littlearm %t.txt %t.arm.o 9 # RUN: llvm-objcopy -I binary -O elf32-i386 %t.txt %t.i386.o 12 # RUN: llvm-objcopy -I binary -O elf64-x86-64 %t.txt %t.x86-64.o 15 # RUN: llvm-objcopy -I binary -O elf32-bigmips %t.txt %t.mips.o 18 # RUN: llvm-objcopy -I binary -O elf32-powerpc %t.txt %t.ppc32be.o 21 # RUN: llvm-objcopy -I binary -O elf32-powerpcle %t.txt %t.ppc32le.o 24 # RUN: llvm-objcopy -I binary -O elf64-powerpc %t.txt %t.ppc64be.o 36 # RUN: llvm-objcopy -I binary -O elf32-sparc %t.txt %t.sparc.o 39 # RUN: llvm-objcopy -I binary -O elf32-sparcel %t.txt %t.sparcel.o [all …]
|
| H A D | set-section-flags.test | 4 # RUN: llvm-objcopy --set-section-flags=.foo=alloc \ 7 # RUN: llvm-objcopy --set-section-flags=.foo=load \ 10 # RUN: llvm-objcopy --set-section-flags=.foo=noload \ 13 # RUN: llvm-objcopy --set-section-flags=.foo=readonly \ 16 # RUN: llvm-objcopy --set-section-flags=.foo=exclude \ 19 # RUN: llvm-objcopy --set-section-flags=.foo=debug \ 22 # RUN: llvm-objcopy --set-section-flags=.foo=code \ 25 # RUN: llvm-objcopy --set-section-flags=.foo=data \ 28 # RUN: llvm-objcopy --set-section-flags=.foo=rom \ 34 # RUN: llvm-objcopy --set-section-flags=.foo=merge \ [all …]
|
| H A D | ihex-writer.test | 2 # RUN: llvm-objcopy -O ihex %t - | FileCheck %s 8 # RUN: llvm-objcopy -O ihex %t-segs - | FileCheck %s --check-prefix=SEGMENTS 12 # RUN: llvm-objcopy -O ihex %t2-segs - | FileCheck %s --check-prefix=PT_NULL 17 # RUN: llvm-objcopy -O ihex --only-section=.text1 %t-sec2 - | FileCheck %s --check-prefix=SIGN_EXTE… 21 # RUN: not llvm-objcopy -O ihex --only-section=.text2 %t-sec2 %t-sec2-2.hex 2>&1 | FileCheck %s --c… 22 # RUN: not llvm-objcopy -O ihex --only-section=.text3 %t-sec2 %t-sec2-3.hex 2>&1 | FileCheck %s --c… 25 # RUN: llvm-objcopy -O ihex --only-section=.text %t-sec2 - | FileCheck %s --check-prefix=ZERO_SIZE_… 29 # RUN: llvm-objcopy -O ihex --set-start=0xFFFF %t - | FileCheck %s --check-prefix=START1 33 # RUN: llvm-objcopy -O ihex --set-start=0x100000 %t - | FileCheck %s --check-prefix=START2 36 # RUN: llvm-objcopy -O ihex --set-start=0xFFFFFFFF80001000 %t - | FileCheck %s --check-prefix=START3 [all …]
|
| H A D | wildcard-syntax.test | 1 ## This test checks that llvm-objcopy accepts glob (or "shell wildcard") syntax 7 # RUN: llvm-objcopy --remove-section='.f*' %t.o %t.glob.o 12 # RUN: llvm-objcopy --remove-section='*a' %t.o %t.full.o 17 # RUN: llvm-objcopy --remove-section='.b?r' %t.o %t.question.o 23 # RUN: llvm-objcopy --remove-section='.???' --remove-section='!.f*' \ 27 # RUN: llvm-objcopy --remove-section='!.f*' --remove-section='.???' \ 31 # RUN: llvm-objcopy --remove-section='.???' --remove-section='!.f*' \ 42 # RUN: llvm-objcopy --remove-section='.[^x]oo' %t.o %t.negrange.1.o 45 # RUN: llvm-objcopy --remove-section='.[!x]oo' %t.o %t.negrange.2.o 67 # RUN: llvm-objcopy --remove-section='\*' %t.special.o %t.escape.1.o [all …]
|
| H A D | add-symbol.test | 2 # RUN: llvm-objcopy --add-symbol='abs1=1' \ 14 # RUN: llvm-objcopy \ 20 # RUN: not llvm-objcopy --add-symbol='test' %t %t4 2>&1 | FileCheck %s --check-prefix=ERR1 21 # RUN: not llvm-objcopy --add-symbol='test=:0' %t %t5 2>&1 | FileCheck %s --check-prefix=ERR2 22 # RUN: not llvm-objcopy --add-symbol='test=foo:' %t %t6 2>&1 | FileCheck %s --check-prefix=ERR2 23 # RUN: not llvm-objcopy --add-symbol='test=0,cool' %t %t7 2>&1 | FileCheck %s --check-prefix=ERR3 24 # RUN: not llvm-objcopy --add-symbol='test=0,foo,bar' %t %t8 2>&1 | FileCheck %s --check-prefix=ERR4 25 # RUN: not llvm-objcopy --add-symbol='test=xyz' %t %t9 2>&1 | FileCheck %s --check-prefix=ERR5 59 ## TODO (grimar): llvm-objcopy seems produce a broken output without
|
| H A D | cross-arch-headers.test | 8 # RUN: llvm-objcopy %t.o %t.default.o --split-dwo=%t.default.dwo 12 # RUN: llvm-objcopy %t.o -O elf32-i386 %t.elf32_i386.o --split-dwo=%t.elf32_i386.dwo 20 # RUN: llvm-objcopy %t.o -O elf32-iamcu %t.elf32_iamcu.o --split-dwo=%t.elf32_iamcu.dwo 28 # RUN: llvm-objcopy %t.o -O elf64-aarch64 %t.elf64_aarch64.o --split-dwo=%t.elf64_aarch64.dwo 36 # RUN: llvm-objcopy %t.o -O elf32-powerpc %t.elf32_powerpc.o --split-dwo=%t.elf32_powerpc.dwo 40 # RUN: llvm-objcopy %t.o -O elf64-powerpc %t.elf64_powerpc.o --split-dwo=%t.elf64_powerpc.dwo 44 # RUN: llvm-objcopy %t.o -O elf32-powerpcle %t.elf32_ppcle.o --split-dwo=%t.elf32_ppcle.dwo 48 # RUN: llvm-objcopy %t.o -O elf64-powerpcle %t.elf64_ppcle.o --split-dwo=%t.elf64_ppcle.dwo 52 # RUN: llvm-objcopy %t.o -O elf32-x86-64 %t.elf32_x86_64.o --split-dwo=%t.elf32_x86_64.dwo 64 # RUN: llvm-objcopy %t.o -O elf64-x86-64 %t.elf64_x86_64.o --split-dwo=%t.elf64_x86_64.dwo [all …]
|
| H A D | add-section.test | 2 # RUN: llvm-objcopy -O binary -j .test2 %t %t.sec 3 # RUN: llvm-objcopy -R .test2 %t %t2 4 # RUN: llvm-objcopy --add-section=.test2=%t.sec %t2 %t3 50 ## Test that llvm-objcopy produces an error if the file with section contents 52 # RUN: not llvm-objcopy --add-section=.section.name=%t.missing %t %t.out 2>&1 | FileCheck -DFILE=%t… 57 # RUN: not llvm-objcopy --add-section=.section.name %t %t.out 2>&1 | FileCheck %s --check-prefixes=… 62 # RUN: not llvm-objcopy --add-section=.section.name= %t %t.out 2>&1 | FileCheck %s --check-prefixes…
|
| H A D | discard-mix-local-and-all.test | 5 # RUN: llvm-objcopy %t %t-discard-none 7 # RUN: llvm-objcopy --discard-all %t %t-discard-all 9 # RUN: llvm-objcopy --discard-locals %t %t-discard-locals 13 # RUN: llvm-objcopy --discard-all --discard-locals %t %t.1.o 15 # RUN: llvm-objcopy --discard-locals --discard-all %t %t.2.o 17 # RUN: llvm-objcopy -x -X %t %t.3.o 19 # RUN: llvm-objcopy -X -x %t %t.4.o 21 # RUN: llvm-objcopy -x -X -x -X %t %t.5.o 23 # RUN: llvm-objcopy -X -x -X -x %t %t.6.o 25 # RUN: llvm-objcopy -X -x -X -x --discard-locals %t %t.7.o [all …]
|
| H A D | new-symbol-visibility.test | 4 # RUN: llvm-objcopy -I binary -O elf64-x86-64 %s %t.unspecified 6 # RUN: llvm-objcopy --new-symbol-visibility default -I binary -O elf64-x86-64 %s %t.default 8 # RUN: llvm-objcopy --new-symbol-visibility hidden -I binary -O elf64-x86-64 %s %t.hidden 10 # RUN: llvm-objcopy --new-symbol-visibility protected -I binary -O elf64-x86-64 %s %t.protected 12 # RUN: llvm-objcopy --new-symbol-visibility internal -I binary -O elf64-x86-64 %s %t.internal 19 # RUN: not llvm-objcopy --new-symbol-visibility fluff -I binary -O elf64-x86-64 \
|
| H A D | mirror-permissions-unix.test | 5 ## llvm-objcopy respects the umask in setting output permissions. 26 # RUN: llvm-objcopy %t %t1 31 # RUN: llvm-objcopy %t %t1 36 # RUN: llvm-objcopy %t %t1 42 # RUN: llvm-objcopy %t %t1 49 # RUN: llvm-objcopy %t /dev/null 54 # RUN: cp %t %t1 && chmod 0777 %t1 && llvm-objcopy %t1
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/COFF/ |
| H A D | set-section-flags.test | 4 # RUN: llvm-objcopy --set-section-flags=.foo=alloc %t %t.alloc 6 # RUN: llvm-objcopy --set-section-flags=.foo=load %t %t.load 8 # RUN: llvm-objcopy --set-section-flags=.foo=noload %t %t.noload 10 # RUN: llvm-objcopy --set-section-flags=.foo=readonly %t %t.readonly 12 # RUN: llvm-objcopy --set-section-flags=.foo=exclude %t %t.exclude 14 # RUN: llvm-objcopy --set-section-flags=.foo=debug %t %t.debug 16 # RUN: llvm-objcopy --set-section-flags=.foo=code %t %t.code 18 # RUN: llvm-objcopy --set-section-flags=.foo=data %t %t.data 20 # RUN: llvm-objcopy --set-section-flags=.foo=rom %t %t.rom 24 # RUN: llvm-objcopy --set-section-flags=.foo=merge %t %t.merge [all …]
|
| H A D | add-section.test | 3 ## Test that llvm-objcopy adds a section to the given object with expected 6 # RUN: llvm-objcopy --add-section=.test.section=%t.sec %t %t1 20 ## Test that llvm-objcopy can add a section with an empty name. 21 # RUN: llvm-objcopy --add-section==%t.sec %t %t1.empty.name 35 ## Test that llvm-objcopy can add a section to an object with extended 39 # RUN: llvm-objcopy --add-section=.test.section=%t.sec %t.xrelocs.obj %t1.xrelocs.obj 60 ## Test that llvm-objcopy produces an error if the file with section contents 62 # RUN: not llvm-objcopy --add-section=.another.section=%t2 %t %t3 2>&1 | FileCheck -DFILE=%t2 -DMSG… 67 # RUN: not llvm-objcopy --add-section=.another.section %t %t3 2>&1 | FileCheck %s --check-prefixes=… 72 # RUN: not llvm-objcopy --add-section=.section.name= %t %t3 2>&1 | FileCheck %s --check-prefixes=ER…
|
| /llvm-project-15.0.7/llvm/tools/llvm-objcopy/ |
| H A D | CMakeLists.txt | 26 add_llvm_tool(llvm-objcopy 28 llvm-objcopy.cpp 36 add_llvm_tool_symlink(llvm-install-name-tool llvm-objcopy) 37 add_llvm_tool_symlink(llvm-bitcode-strip llvm-objcopy) 38 add_llvm_tool_symlink(llvm-strip llvm-objcopy) 41 add_llvm_tool_symlink(objcopy llvm-objcopy) 42 add_llvm_tool_symlink(strip llvm-objcopy)
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/ |
| H A D | tool-name.test | 7 # RUN: ln -s llvm-objcopy %t/llvm-objcopy-11.exe 8 # RUN: ln -s llvm-objcopy %t/powerpc64-unknown-freebsd13-objcopy 10 # RUN: llvm-objcopy --help | FileCheck --check-prefix=OBJCOPY %s 11 # RUN: %t/llvm-objcopy-11.exe --help | FileCheck --check-prefix=OBJCOPY %s 12 # RUN: %t/powerpc64-unknown-freebsd13-objcopy --help | FileCheck --check-prefix=OBJCOPY %s 14 # OBJCOPY: OVERVIEW: llvm-objcopy tool
|
| H A D | grouped-options.test | 9 # RUN: llvm-objcopy -S -x %t %t-objcopy-separated 10 # RUN: llvm-objcopy -Sx %t %t-objcopy-grouped 11 # RUN: cmp %t-objcopy-separated %t-objcopy-grouped
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/MachO/ |
| H A D | update-section.test | 7 # RUN: llvm-objcopy --update-section __TEXT,__text=%t.diff %t - | obj2yaml | FileCheck %s 10 # RUN: llvm-objcopy --update-section __TEXT,__text=%t.smaller %t - | obj2yaml | FileCheck %s --chec… 13 # RUN: not llvm-objcopy --update-section __TEXT,__text=%t.larger %t /dev/null 2>&1 | FileCheck %s -… 16 # RUN: not llvm-objcopy --update-section __TEXT,__text=%t.noexist %t /dev/null 18 # RUN: not llvm-objcopy --update-section __NOEXIST,__text=%t.diff %t /dev/null 2>&1 | FileCheck %s … 21 # RUN: not llvm-objcopy --update-section __TEXT,__noexist=%t.diff %t /dev/null 2>&1 | FileCheck %s … 26 # RUN: llvm-objcopy --update-section __TEXT,__text=%t.diff %t - | obj2yaml | FileCheck %s --check-p… 29 # RUN: not llvm-objcopy --update-section __text=%t.diff %t /dev/null 2>&1 | FileCheck %s --check-pr…
|
| H A D | min-version-load-commands.test | 1 ## This test verifies that llvm-objcopy correctly handles min os version load commands. 7 # RUN: llvm-objcopy %t.iphoneos %t.iphoneos.copy 11 # RUN: llvm-objcopy %t.macos %t.macos.copy 15 # RUN: llvm-objcopy %t.tvos %t.tvos.copy 19 # RUN: llvm-objcopy %t.watchos %t.watchos.copy
|