diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-06-18 17:55:29 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-06-18 17:55:29 +0200 |
commit | d832c0051f4e9cc7d26ef3bc6e9b662bc6a90f3a (patch) | |
tree | f7980a9c140174713b703851d06ed61283631e13 /tools/objtool/elf.h | |
parent | 14bda4e5293ed9722f1dc39b543024e37707d6c6 (diff) | |
parent | 0f1441b44e823a74f3f3780902a113e07c73fbf6 (diff) | |
download | linux-d832c0051f4e9cc7d26ef3bc6e9b662bc6a90f3a.tar.bz2 |
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>
Diffstat (limited to 'tools/objtool/elf.h')
-rw-r--r-- | tools/objtool/elf.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/objtool/elf.h b/tools/objtool/elf.h index 78a2db23b8b6..6cc80a075166 100644 --- a/tools/objtool/elf.h +++ b/tools/objtool/elf.h @@ -67,9 +67,10 @@ struct reloc { }; struct section *sec; struct symbol *sym; - unsigned int type; unsigned long offset; + unsigned int type; int addend; + int idx; bool jump_table_start; }; @@ -79,6 +80,7 @@ struct elf { Elf *elf; GElf_Ehdr ehdr; int fd; + bool changed; char *name; struct list_head sections; DECLARE_HASHTABLE(symbol_hash, ELF_HASH_BITS); @@ -121,7 +123,11 @@ struct elf *elf_open_read(const char *name, int flags); struct section *elf_create_section(struct elf *elf, const char *name, size_t entsize, int nr); struct section *elf_create_reloc_section(struct elf *elf, struct section *base, int reltype); void elf_add_reloc(struct elf *elf, struct reloc *reloc); -int elf_write(const struct elf *elf); +int elf_write_insn(struct elf *elf, struct section *sec, + unsigned long offset, unsigned int len, + const char *insn); +int elf_write_reloc(struct elf *elf, struct reloc *reloc); +int elf_write(struct elf *elf); void elf_close(struct elf *elf); struct section *find_section_by_name(const struct elf *elf, const char *name); @@ -133,7 +139,7 @@ struct reloc *find_reloc_by_dest(const struct elf *elf, struct section *sec, uns struct reloc *find_reloc_by_dest_range(const struct elf *elf, struct section *sec, unsigned long offset, unsigned int len); struct symbol *find_func_containing(struct section *sec, unsigned long offset); -int elf_rebuild_reloc_section(struct section *sec); +int elf_rebuild_reloc_section(struct elf *elf, struct section *sec); #define for_each_sec(file, sec) \ list_for_each_entry(sec, &file->elf->sections, list) |