mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Merge branch 'objtool/urgent' into objtool/core
Conflicts: tools/objtool/elf.c tools/objtool/elf.h tools/objtool/orc_gen.c tools/objtool/check.c Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
This commit is contained in:
commit
d832c0051f
8 changed files with 120 additions and 9 deletions
|
@ -565,3 +565,21 @@ void arch_initial_func_cfi_state(struct cfi_init_state *state)
|
|||
state->regs[16].base = CFI_CFA;
|
||||
state->regs[16].offset = -8;
|
||||
}
|
||||
|
||||
const char *arch_nop_insn(int len)
|
||||
{
|
||||
static const char nops[5][5] = {
|
||||
/* 1 */ { 0x90 },
|
||||
/* 2 */ { 0x66, 0x90 },
|
||||
/* 3 */ { 0x0f, 0x1f, 0x00 },
|
||||
/* 4 */ { 0x0f, 0x1f, 0x40, 0x00 },
|
||||
/* 5 */ { 0x0f, 0x1f, 0x44, 0x00, 0x00 },
|
||||
};
|
||||
|
||||
if (len < 1 || len > 5) {
|
||||
WARN("invalid NOP size: %d\n", len);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return nops[len-1];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue