1 # This test has a subtle purpose. Because of the specifics of the layout
2 # algorithm if we're not careful cycles can occur when we resolve the order
3 # that we should layout segments in. In this test we're making sure that the
4 # PT_LOAD segment won't set the PT_NOTE segment as the first to be laid out
5 # while the PT_NOTE segment sets the PT_LOAD load to be the first to be laid
6 # out. This problem becomes visible if the layout of the file changes due to
7 # the removal of a section. We use -O binary here because removing a section
8 # in this way won't cause the location of the PT_LOAD segment to change if we
11 # RUN: yaml2obj %s -o %t
12 # RUN: llvm-objcopy -R .note -O binary %t %t2
13 # RUN: od -Ax -t x1 %t2 | FileCheck %s
47 # CHECK: 000000 de ad be ef