xref: /llvm-project/llvm/test/tools/llvm-objcopy/ELF/strip-sections-only-section.test (revision 55c81d4282c5da0189711261a11537bc8a7fe85c)
1*55c81d42SFangrui Song# RUN: yaml2obj %s -o %t
2298ea3f5SJordan Rupprecht# RUN: llvm-objcopy --strip-sections --only-section=.test %t %t2
385985ed3SJake Ehrlich# RUN: od -Ax -t x1 %t2 | FileCheck %s
4298ea3f5SJordan Rupprecht# RUN: od -Ax -t c  %t2 | FileCheck %s --check-prefix=TEXT
585985ed3SJake Ehrlich
685985ed3SJake Ehrlich!ELF
785985ed3SJake EhrlichFileHeader:
885985ed3SJake Ehrlich  Class:           ELFCLASS64
985985ed3SJake Ehrlich  Data:            ELFDATA2LSB
1085985ed3SJake Ehrlich  Type:            ET_REL
1185985ed3SJake Ehrlich  Machine:         EM_X86_64
1285985ed3SJake EhrlichSections:
1385985ed3SJake Ehrlich  - Name:            .test
1485985ed3SJake Ehrlich    Type:            SHT_PROGBITS
1585985ed3SJake Ehrlich    Flags:           [ ]
1685985ed3SJake Ehrlich    Content:        "DEADBEEF"
1785985ed3SJake Ehrlich
1885985ed3SJake Ehrlich# CHECK: de ad be ef
1985985ed3SJake Ehrlich
2085985ed3SJake Ehrlich# TEXT-NOT: t e s t
21