1 # RUN: yaml2obj %s -o %t
2 # RUN: not llvm-objcopy --remove-section __DATA,C %t /dev/null 2>&1 | FileCheck %s
4 # CHECK: symbol '_a' defined in section with index '2' cannot be removed because it is referenced by a relocation in section '__TEXT,__text'
6 ## The binary used in this test was built as follows:
8 ## __attribute__((section("__DATA,C"))) int a = 2;
9 ## int f() { return a; }
11 ## clang -fno-exceptions -fno-unwind-tables -c main.c -o main.o
17 cpusubtype: 0x00000003
38 addr: 0x0000000000000000
48 content: 554889E58B05000000005DC3
60 addr: 0x000000000000000C
71 - cmd: LC_BUILD_VERSION