1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2017 Josh Poimboeuf <jpoimboe@redhat.com>
9 * This is a lookup table for speeding up access to the .orc_unwind table.
10 * Given an input address offset, the corresponding lookup table entry
11 * specifies a subset of the .orc_unwind table to search.
13 * Each block represents the end of the previous range and the start of the
14 * next range. An extra block is added to give the last range an end.
16 * The block size should be a power of 2 to avoid a costly 'div' instruction.
18 * A block size of 256 was chosen because it roughly doubles unwinder
19 * performance while only adding ~5% to the ORC data footprint.
21 #define LOOKUP_BLOCK_ORDER 8
22 #define LOOKUP_BLOCK_SIZE (1 << LOOKUP_BLOCK_ORDER)
26 extern unsigned int orc_lookup
[];
27 extern unsigned int orc_lookup_end
[];
29 #define LOOKUP_START_IP (unsigned long)_stext
30 #define LOOKUP_STOP_IP (unsigned long)_etext
32 #endif /* LINKER_SCRIPT */
34 #endif /* _ORC_LOOKUP_H */