mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-22 04:31:58 +08:00
1e7e478838
Add the inline static call implementation for x86-64. The generated code is identical to the out-of-line case, except we move the trampoline into it's own section. Objtool uses the trampoline naming convention to detect all the call sites. It then annotates those call sites in the .static_call_sites section. During boot (and module init), the call sites are patched to call directly into the destination function. The temporary trampoline is then no longer used. [peterz: merged trampolines, put trampoline in section] Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20200818135804.864271425@infradead.org
29 lines
636 B
C
29 lines
636 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2020 Matt Helsley <mhelsley@vmware.com>
|
|
*/
|
|
|
|
#ifndef _OBJTOOL_H
|
|
#define _OBJTOOL_H
|
|
|
|
#include <stdbool.h>
|
|
#include <linux/list.h>
|
|
#include <linux/hashtable.h>
|
|
|
|
#include "elf.h"
|
|
|
|
struct objtool_file {
|
|
struct elf *elf;
|
|
struct list_head insn_list;
|
|
DECLARE_HASHTABLE(insn_hash, 20);
|
|
struct list_head static_call_list;
|
|
bool ignore_unreachables, c_file, hints, rodata;
|
|
};
|
|
|
|
int check(const char *objname, bool orc);
|
|
int orc_dump(const char *objname);
|
|
int create_orc(struct objtool_file *file);
|
|
int create_orc_sections(struct objtool_file *file);
|
|
|
|
#endif /* _OBJTOOL_H */
|