1 # RUN: yaml2obj %s -o %t
4 # RUN: llvm-objcopy --set-start 0x1000 %t %t2
5 # RUN: llvm-readobj --file-headers %t2 | FileCheck %s --check-prefix=SET
6 # RUN: llvm-objcopy --set-start 4096 %t %t3
8 # RUN: llvm-objcopy --set-start 0x100000000 %t %t4
9 # RUN: llvm-readobj --file-headers %t4 | FileCheck %s --check-prefix=SET-LARGE
10 # RUN: not llvm-objcopy --set-start -123 %t %t5 2>&1 | FileCheck %s --check-prefix=SET-ERR
12 # Test --change-start.
13 # RUN: llvm-objcopy --change-start 0x50 %t %t6
14 # RUN: llvm-readobj --file-headers %t6 | FileCheck %s --check-prefix=ADD
15 # RUN: llvm-objcopy --change-start 0x100000000 %t %t7
16 # RUN: llvm-readobj --file-headers %t7 | FileCheck %s --check-prefix=ADD-LARGE
17 # RUN: llvm-objcopy --change-start -4353 %t %t8
18 # RUN: llvm-readobj --file-headers %t8 | FileCheck %s --check-prefix=ADD-UNDERFLOW
19 # RUN: llvm-objcopy --change-start -0x1101 %t %t9
21 # RUN: not llvm-objcopy --change-start -xyz %t %t10 2>&1 | FileCheck %s --check-prefix=ADD-ERR
23 # Test --change-start after --set-start. Result should be 0x1150.
24 # RUN: llvm-objcopy --set-start 0x1000 --change-start 0x100 --change-start 0x50 %t %t11
27 # If --set-start is after --change-start then --change-start has no effect.
28 # RUN: llvm-objcopy --change-start 0x150 --set-start 0x1000 %t %t12
31 # --adjust-start is an alias for --change-start.
32 # RUN: llvm-objcopy --adjust-start -0x1101 %t %t13
45 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
47 AddressAlign: 0x0000000000001000
53 # SET-ERR: error: bad entry point address: '-123'
54 # SET-LARGE: Entry: 0x100000000
55 # ADD-LARGE: Entry: 0x100001100
56 # ADD-ERR: error: bad entry point increment: '-xyz'
57 # ADD-UNDERFLOW: Entry: 0xFFFFFFFFFFFFFFFF