Home
last modified time | relevance | path

Searched refs:elf (Results 1 - 25 of 633) sorted by relevance

12345678910>>...26

/kernel/linux/linux-6.6/tools/objtool/include/objtool/
H A Delf.h15 #include <arch/elf.h>
81 struct elf { struct
82 Elf *elf; member
107 struct elf *elf_open_read(const char *name, int flags);
109 struct section *elf_create_section(struct elf *elf, const char *name,
111 struct section *elf_create_section_pair(struct elf *elf, const char *name,
115 struct symbol *elf_create_prefix_symbol(struct elf *elf, struc
151 has_multiple_files(struct elf *elf) has_multiple_files() argument
156 elf_addr_size(struct elf *elf) elf_addr_size() argument
161 elf_rela_size(struct elf *elf) elf_rela_size() argument
166 elf_data_rela_type(struct elf *elf) elf_data_rela_type() argument
171 elf_text_rela_type(struct elf *elf) elf_text_rela_type() argument
186 mark_sec_changed(struct elf *elf, struct section *sec, bool changed) mark_sec_changed() argument
241 set_reloc_offset(struct elf *elf, struct reloc *reloc, u64 offset) set_reloc_offset() argument
252 set_reloc_addend(struct elf *elf, struct reloc *reloc, s64 addend) set_reloc_addend() argument
277 set_reloc_sym(struct elf *elf, struct reloc *reloc, unsigned int sym) set_reloc_sym() argument
287 set_reloc_type(struct elf *elf, struct reloc *reloc, unsigned int type) set_reloc_type() argument
[all...]
H A Dendianness.h7 #include <objtool/elf.h>
15 static inline bool need_bswap(struct elf *elf) in need_bswap() argument
18 (elf->ehdr.e_ident[EI_DATA] == ELFDATA2LSB); in need_bswap()
21 #define bswap_if_needed(elf, val) \
24 bool __need_bswap = need_bswap(elf); \
/kernel/linux/linux-6.6/tools/objtool/
H A Delf.c3 * elf.c - ELF access library
22 #include <objtool/elf.h>
32 #define __elf_table(name) (elf->name##_hash)
33 #define __elf_bits(name) (elf->name##_bits)
132 struct section *find_section_by_name(const struct elf *elf, const char *name) in find_section_by_name() argument
144 static struct section *find_section_by_index(struct elf *elf, in find_section_by_index() argument
157 static struct symbol *find_symbol_by_index(struct elf *elf, unsigne argument
256 find_symbol_by_name(const struct elf *elf, const char *name) find_symbol_by_name() argument
268 find_reloc_by_dest_range(const struct elf *elf, struct section *sec, unsigned long offset, unsigned int len) find_reloc_by_dest_range() argument
298 find_reloc_by_dest(const struct elf *elf, struct section *sec, unsigned long offset) find_reloc_by_dest() argument
308 read_sections(struct elf *elf) read_sections() argument
394 elf_add_symbol(struct elf *elf, struct symbol *sym) elf_add_symbol() argument
435 read_symbols(struct elf *elf) read_symbols() argument
579 elf_update_sym_relocs(struct elf *elf, struct symbol *sym) elf_update_sym_relocs() argument
597 elf_update_symbol(struct elf *elf, struct section *symtab, struct section *symtab_shndx, struct symbol *sym) elf_update_symbol() argument
728 __elf_create_symbol(struct elf *elf, struct symbol *sym) __elf_create_symbol() argument
794 elf_create_section_symbol(struct elf *elf, struct section *sec) elf_create_section_symbol() argument
822 elf_create_prefix_symbol(struct elf *elf, struct symbol *orig, long size) elf_create_prefix_symbol() argument
850 elf_init_reloc(struct elf *elf, struct section *rsec, unsigned int reloc_idx, unsigned long offset, struct symbol *sym, s64 addend, unsigned int type) elf_init_reloc() argument
886 elf_init_reloc_text_sym(struct elf *elf, struct section *sec, unsigned long offset, unsigned int reloc_idx, struct section *insn_sec, unsigned long insn_off) elf_init_reloc_text_sym() argument
919 elf_init_reloc_data_sym(struct elf *elf, struct section *sec, unsigned long offset, unsigned int reloc_idx, struct symbol *sym, s64 addend) elf_init_reloc_data_sym() argument
935 read_relocs(struct elf *elf) read_relocs() argument
998 struct elf *elf; elf_open_read() local
1053 elf_add_string(struct elf *elf, struct section *strtab, char *str) elf_add_string() argument
1090 elf_create_section(struct elf *elf, const char *name, size_t entsize, unsigned int nr) elf_create_section() argument
1170 elf_create_rela_section(struct elf *elf, struct section *sec, unsigned int reloc_nr) elf_create_rela_section() argument
1209 elf_create_section_pair(struct elf *elf, const char *name, size_t entsize, unsigned int nr, unsigned int reloc_nr) elf_create_section_pair() argument
1225 elf_write_insn(struct elf *elf, struct section *sec, unsigned long offset, unsigned int len, const char *insn) elf_write_insn() argument
1252 elf_truncate_section(struct elf *elf, struct section *sec) elf_truncate_section() argument
1297 elf_write(struct elf *elf) elf_write() argument
1341 elf_close(struct elf *elf) elf_close() argument
[all...]
H A Dorc_dump.c76 Elf *elf; in orc_dump() local
82 struct elf dummy_elf = {}; in orc_dump()
95 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in orc_dump()
96 if (!elf) { in orc_dump()
101 if (!elf64_getehdr(elf)) { in orc_dump()
105 memcpy(&dummy_elf.ehdr, elf64_getehdr(elf), sizeof(dummy_elf.ehdr)); in orc_dump()
107 if (elf_getshdrnum(elf, &nr_sections)) { in orc_dump()
112 if (elf_getshdrstrndx(elf, &shstrtab_idx)) { in orc_dump()
118 scn = elf_getscn(elf, i); in orc_dump()
129 name = elf_strptr(elf, shstrtab_id in orc_dump()
[all...]
H A Dspecial.c68 static int get_alt_entry(struct elf *elf, const struct special_entry *entry, in get_alt_entry() argument
90 feature = bswap_if_needed(elf, in get_alt_entry()
97 orig_reloc = find_reloc_by_dest(elf, sec, offset + entry->orig); in get_alt_entry()
106 new_reloc = find_reloc_by_dest(elf, sec, offset + entry->new); in get_alt_entry()
123 key_reloc = find_reloc_by_dest(elf, sec, offset + entry->key); in get_alt_entry()
140 int special_get_alts(struct elf *elf, struct list_head *alts) in special_get_alts() argument
151 sec = find_section_by_name(elf, entry->sec); in special_get_alts()
171 ret = get_alt_entry(elf, entr in special_get_alts()
[all...]
H A Dorc_gen.c107 static int write_orc_entry(struct elf *elf, struct section *orc_sec, in write_orc_entry() argument
117 orc->sp_offset = bswap_if_needed(elf, orc->sp_offset); in write_orc_entry()
118 orc->bp_offset = bswap_if_needed(elf, orc->bp_offset); in write_orc_entry()
121 if (!elf_init_reloc_text_sym(elf, ip_sec, idx * sizeof(int), idx, in write_orc_entry()
235 sec = find_section_by_name(file->elf, ".orc_unwind"); in orc_create()
240 orc_sec = elf_create_section(file->elf, ".orc_unwind", in orc_create()
245 sec = elf_create_section_pair(file->elf, ".orc_unwind_ip", sizeof(int), nr, nr); in orc_create()
251 if (write_orc_entry(file->elf, orc_sec, sec, idx++, in orc_create()
/kernel/linux/linux-5.10/tools/objtool/
H A Delf.c3 * elf.c - ELF access library
20 #include "elf.h"
130 struct section *find_section_by_name(const struct elf *elf, const char *name) in find_section_by_name() argument
134 elf_hash_for_each_possible(elf->section_name_hash, sec, name_hash, str_hash(name)) in find_section_by_name()
141 static struct section *find_section_by_index(struct elf *elf, in find_section_by_index() argument
146 elf_hash_for_each_possible(elf->section_hash, sec, hash, idx) in find_section_by_index()
153 static struct symbol *find_symbol_by_index(struct elf *elf, unsigne argument
220 find_symbol_by_name(const struct elf *elf, const char *name) find_symbol_by_name() argument
231 find_reloc_by_dest_range(const struct elf *elf, struct section *sec, unsigned long offset, unsigned int len) find_reloc_by_dest_range() argument
260 find_reloc_by_dest(const struct elf *elf, struct section *sec, unsigned long offset) find_reloc_by_dest() argument
265 read_sections(struct elf *elf) read_sections() argument
344 elf_add_symbol(struct elf *elf, struct symbol *sym) elf_add_symbol() argument
375 read_symbols(struct elf *elf) read_symbols() argument
512 elf_add_reloc(struct elf *elf, struct section *sec, unsigned long offset, unsigned int type, struct symbol *sym, s64 addend) elf_add_reloc() argument
546 elf_dirty_reloc_sym(struct elf *elf, struct symbol *sym) elf_dirty_reloc_sym() argument
573 elf_update_symbol(struct elf *elf, struct section *symtab, struct section *symtab_shndx, struct symbol *sym) elf_update_symbol() argument
692 elf_create_section_symbol(struct elf *elf, struct section *sec) elf_create_section_symbol() argument
760 elf_add_reloc_to_insn(struct elf *elf, struct section *sec, unsigned long offset, unsigned int type, struct section *insn_sec, unsigned long insn_off) elf_add_reloc_to_insn() argument
810 read_relocs(struct elf *elf) read_relocs() argument
880 struct elf *elf; elf_open_read() local
941 elf_add_string(struct elf *elf, struct section *strtab, char *str) elf_add_string() argument
978 elf_create_section(struct elf *elf, const char *name, unsigned int sh_flags, size_t entsize, int nr) elf_create_section() argument
1061 elf_create_rel_reloc_section(struct elf *elf, struct section *base) elf_create_rel_reloc_section() argument
1091 elf_create_rela_reloc_section(struct elf *elf, struct section *base) elf_create_rela_reloc_section() argument
1121 elf_create_reloc_section(struct elf *elf, struct section *base, int reltype) elf_create_reloc_section() argument
1191 elf_rebuild_reloc_section(struct elf *elf, struct section *sec) elf_rebuild_reloc_section() argument
1207 elf_write_insn(struct elf *elf, struct section *sec, unsigned long offset, unsigned int len, const char *insn) elf_write_insn() argument
1226 elf_write_reloc(struct elf *elf, struct reloc *reloc) elf_write_reloc() argument
1254 elf_write(struct elf *elf) elf_write() argument
1297 elf_close(struct elf *elf) elf_close() argument
[all...]
H A Delf.h85 struct elf { struct
86 Elf *elf; member
128 struct elf *elf_open_read(const char *name, int flags);
129 struct section *elf_create_section(struct elf *elf, const char *name, unsigned int sh_flags, size_t entsize, int nr);
131 int elf_add_reloc(struct elf *elf, struct section *sec, unsigned long offset,
133 int elf_add_reloc_to_insn(struct elf *elf, struct section *sec,
137 int elf_write_insn(struct elf *el
[all...]
H A Dorc_dump.c72 Elf *elf; in orc_dump() local
90 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in orc_dump()
91 if (!elf) { in orc_dump()
96 if (elf_getshdrnum(elf, &nr_sections)) { in orc_dump()
101 if (elf_getshdrstrndx(elf, &shstrtab_idx)) { in orc_dump()
107 scn = elf_getscn(elf, i); in orc_dump()
118 name = elf_strptr(elf, shstrtab_idx, sh.sh_name); in orc_dump()
167 scn = elf_getscn(elf, sym.st_shndx); in orc_dump()
178 name = elf_strptr(elf, shstrtab_idx, sh.sh_name); in orc_dump()
184 name = elf_strptr(elf, strtab_id in orc_dump()
[all...]
H A Dspecial.c65 static int get_alt_entry(struct elf *elf, struct special_entry *entry, in get_alt_entry() argument
92 orig_reloc = find_reloc_by_dest(elf, sec, offset + entry->orig); in get_alt_entry()
101 new_reloc = find_reloc_by_dest(elf, sec, offset + entry->new); in get_alt_entry()
123 int special_get_alts(struct elf *elf, struct list_head *alts) in special_get_alts() argument
134 sec = find_section_by_name(elf, entry->sec); in special_get_alts()
154 ret = get_alt_entry(elf, entry, sec, idx, alt); in special_get_alts()
/kernel/linux/linux-6.6/arch/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c27 #include <elf.h>
137 } elf; variable
164 elf.path, ## __VA_ARGS__); \
172 elf.path, strerror(errno)); \
198 #define elf_ptr(type, off) ((type *)(elf.begin + (off)))
202 for (var = elf.sh_table; var < elf.sh_table + elf16toh(elf.ehdr->e_shnum); ++var)
218 return elf.sh_string + elf32toh(shdr->sh_name); in section_name()
238 return &elf in section_by_idx()
[all...]
/kernel/linux/linux-5.10/tools/perf/util/
H A Dsymbol-elf.c77 static int elf_getphdrnum(Elf *elf, size_t *dst) in elf_getphdrnum() argument
82 ehdr = gelf_getehdr(elf, &gehdr); in elf_getphdrnum()
93 static int elf_getshdrstrndx(Elf *elf __maybe_unused, size_t *dst __maybe_unused) in elf_getshdrstrndx()
190 static size_t elf_addr_to_index(Elf *elf, GElf_Addr addr) in elf_addr_to_index() argument
196 while ((sec = elf_nextscn(elf, sec)) != NULL) { in elf_addr_to_index()
209 Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, in elf_section_by_name() argument
216 if (!elf_rawdata(elf_getscn(elf, ep->e_shstrndx), NULL)) in elf_section_by_name()
219 while ((sec = elf_nextscn(elf, sec)) != NULL) { in elf_section_by_name()
223 str = elf_strptr(elf, ep->e_shstrndx, shp->sh_name); in elf_section_by_name()
235 static int elf_read_program_header(Elf *elf, u6 argument
323 Elf *elf; dso__synthesize_plt_symbols() local
483 elf_read_build_id(Elf *elf, void *bf, size_t size) elf_read_build_id() argument
597 Elf *elf; filename__read_build_id() local
717 Elf *elf; filename__read_debuglink() local
826 Elf *elf; symsrc__init() local
1083 Elf *elf; dso__load_sym() local
1313 elf_read_maps(Elf *elf, bool exe, mapfn_t mapfn, void *data) elf_read_maps() argument
1349 Elf *elf; file__read_maps() local
1369 Elf *elf; dso__type_fd() local
1441 Elf *elf; global() member
1781 kcore_copy__read_maps(struct kcore_copy_info *kci, Elf *elf) kcore_copy__read_maps() argument
1847 kcore_copy__calc_maps(struct kcore_copy_info *kci, const char *dir, Elf *elf) kcore_copy__calc_maps() argument
2178 populate_sdt_note(Elf **elf, const char *data, size_t len, struct list_head *sdt_notes) populate_sdt_note() argument
2310 construct_sdt_notes_list(Elf *elf, struct list_head *sdt_notes) construct_sdt_notes_list() argument
2377 Elf *elf; get_sdt_note_list() local
[all...]
/kernel/linux/linux-6.6/tools/perf/util/
H A Dsymbol-elf.c67 static int elf_getphdrnum(Elf *elf, size_t *dst) in elf_getphdrnum() argument
72 ehdr = gelf_getehdr(elf, &gehdr); in elf_getphdrnum()
83 static int elf_getshdrstrndx(Elf *elf __maybe_unused, size_t *dst __maybe_unused) in elf_getshdrstrndx()
180 static size_t elf_addr_to_index(Elf *elf, GElf_Addr addr) in elf_addr_to_index() argument
186 while ((sec = elf_nextscn(elf, sec)) != NULL) { in elf_addr_to_index()
199 Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, in elf_section_by_name() argument
206 if (!elf_rawdata(elf_getscn(elf, ep->e_shstrndx), NULL)) in elf_section_by_name()
209 while ((sec = elf_nextscn(elf, sec)) != NULL) { in elf_section_by_name()
213 str = elf_strptr(elf, ep->e_shstrndx, shp->sh_name); in elf_section_by_name()
228 Elf *elf; in filename__has_section() local
253 elf_read_program_header(Elf *elf, u64 vaddr, GElf_Phdr *phdr) elf_read_program_header() argument
402 get_ifunc_name(Elf *elf, struct dso *dso, GElf_Ehdr *ehdr, struct rel_info *ri, char *buf, size_t buf_sz) get_ifunc_name() argument
538 get_rela_dyn_info(Elf *elf, GElf_Ehdr *ehdr, struct rela_dyn_info *di, Elf_Scn *scn) get_rela_dyn_info() argument
632 dso__synthesize_plt_got_symbols(struct dso *dso, Elf *elf, GElf_Ehdr *ehdr, char *buf, size_t buf_sz) dso__synthesize_plt_got_symbols() argument
683 Elf *elf; dso__synthesize_plt_symbols() local
856 elf_read_build_id(Elf *elf, void *bf, size_t size) elf_read_build_id() argument
970 Elf *elf; read_build_id() local
1123 Elf *elf; filename__read_debuglink() local
1232 Elf *elf; symsrc__init() local
1499 Elf *elf; dso__load_sym_internal() local
1789 elf_read_maps(Elf *elf, bool exe, mapfn_t mapfn, void *data) elf_read_maps() argument
1825 Elf *elf; file__read_maps() local
1845 Elf *elf; dso__type_fd() local
1917 Elf *elf; global() member
2257 kcore_copy__read_maps(struct kcore_copy_info *kci, Elf *elf) kcore_copy__read_maps() argument
2323 kcore_copy__calc_maps(struct kcore_copy_info *kci, const char *dir, Elf *elf) kcore_copy__calc_maps() argument
2654 populate_sdt_note(Elf **elf, const char *data, size_t len, struct list_head *sdt_notes) populate_sdt_note() argument
2786 construct_sdt_notes_list(Elf *elf, struct list_head *sdt_notes) construct_sdt_notes_list() argument
2853 Elf *elf; get_sdt_note_list() local
[all...]
/kernel/linux/linux-6.6/tools/lib/bpf/
H A Delf.c17 Elf *elf; in elf_open() local
20 pr_warn("elf: failed to init libelf for %s\n", binary_path); in elf_open()
26 pr_warn("elf: failed to open %s: %s\n", binary_path, in elf_open()
30 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in elf_open()
31 if (!elf) { in elf_open()
32 pr_warn("elf: could not read elf from %s: %s\n", binary_path, elf_errmsg(-1)); in elf_open()
37 elf_fd->elf = elf; in elf_open()
45 elf_end(elf_fd->elf); in elf_close()
50 elf_find_next_scn_by_type(Elf *elf, int sh_type, Elf_Scn *scn) elf_find_next_scn_by_type() argument
70 Elf *elf; global() member
79 elf_sym_iter_new(struct elf_sym_iter *iter, Elf *elf, const char *binary_path, int sh_type, int st_type) elf_sym_iter_new() argument
166 elf_find_func_offset(Elf *elf, const char *binary_path, const char *name) elf_find_func_offset() argument
[all...]
/kernel/linux/linux-5.10/scripts/mod/
H A Dmodpost.c15 #include <elf.h>
348 static enum export export_from_secname(struct elf_info *elf, unsigned int sec) in export_from_secname() argument
350 const char *secname = sec_name(elf, sec); in export_from_secname()
366 static enum export export_from_sec(struct elf_info *elf, unsigned int sec) in export_from_sec() argument
368 if (sec == elf->export_sec) in export_from_sec()
370 else if (sec == elf->export_unused_sec) in export_from_sec()
372 else if (sec == elf->export_gpl_sec) in export_from_sec()
374 else if (sec == elf->export_unused_gpl_sec) in export_from_sec()
376 else if (sec == elf->export_gpl_future_sec) in export_from_sec()
821 static const char *sym_name(struct elf_info *elf, Elf_Sy argument
901 check_section(const char *modname, struct elf_info *elf, Elf_Shdr *sechdr) check_section() argument
1280 is_valid_name(struct elf_info *elf, Elf_Sym *sym) is_valid_name() argument
1296 find_elf_symbol(struct elf_info *elf, Elf64_Sword addr, Elf_Sym *relsym) find_elf_symbol() argument
1344 find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, const char *sec) find_elf_symbol2() argument
1584 default_mismatch_handler(const char *modname, struct elf_info *elf, const struct sectioncheck* const mismatch, Elf_Rela *r, Elf_Sym *sym, const char *fromsec) default_mismatch_handler() argument
1614 is_executable_section(struct elf_info* elf, unsigned int section_index) is_executable_section() argument
1659 report_extable_warnings(const char* modname, struct elf_info* elf, const struct sectioncheck* const mismatch, Elf_Rela* r, Elf_Sym* sym, const char* fromsec, const char* tosec) report_extable_warnings() argument
1697 extable_mismatch_handler(const char* modname, struct elf_info *elf, const struct sectioncheck* const mismatch, Elf_Rela* r, Elf_Sym* sym, const char *fromsec) extable_mismatch_handler() argument
1733 check_section_mismatch(const char *modname, struct elf_info *elf, Elf_Rela *r, Elf_Sym *sym, const char *fromsec) check_section_mismatch() argument
1749 reloc_location(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) reloc_location() argument
1755 addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) addend_386_rel() argument
1798 addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) addend_arm_rel() argument
1832 addend_mips_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) addend_mips_rel() argument
1863 section_rela(const char *modname, struct elf_info *elf, Elf_Shdr *sechdr) section_rela() argument
1916 section_rel(const char *modname, struct elf_info *elf, Elf_Shdr *sechdr) section_rel() argument
1988 check_sec_ref(struct module *mod, const char *modname, struct elf_info *elf) check_sec_ref() argument
[all...]
/kernel/linux/linux-6.6/scripts/mod/
H A Dmodpost.c15 #include <elf.h>
711 static const char *sym_name(struct elf_info *elf, Elf_Sym *sym) in sym_name() argument
714 return elf->strtab + sym->st_name; in sym_name()
774 static void check_section(const char *modname, struct elf_info *elf, in check_section() argument
777 const char *sec = sech_name(elf, sechdr); in check_section()
1054 static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) in is_valid_name() argument
1056 const char *name = elf->strtab + sym->st_name; in is_valid_name()
1064 static Elf_Sym *find_nearest_sym(struct elf_info *elf, Elf_Addr addr, in find_nearest_sym() argument
1071 bool is_arm = (elf->hdr->e_machine == EM_ARM); in find_nearest_sym()
1073 for (sym = elf in find_nearest_sym()
1106 find_fromsym(struct elf_info *elf, Elf_Addr addr, unsigned int secndx) find_fromsym() argument
1112 find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) find_tosym() argument
1125 is_executable_section(struct elf_info *elf, unsigned int secndx) is_executable_section() argument
1133 default_mismatch_handler(const char *modname, struct elf_info *elf, const struct sectioncheck* const mismatch, Elf_Sym *tsym, unsigned int fsecndx, const char *fromsec, Elf_Addr faddr, const char *tosec, Elf_Addr taddr) default_mismatch_handler() argument
1181 check_export_symbol(struct module *mod, struct elf_info *elf, Elf_Addr faddr, const char *secname, Elf_Sym *sym) check_export_symbol() argument
1251 check_section_mismatch(struct module *mod, struct elf_info *elf, Elf_Sym *sym, unsigned int fsecndx, const char *fromsec, Elf_Addr faddr, Elf_Addr taddr) check_section_mismatch() argument
1442 get_rel_type_and_sym(struct elf_info *elf, uint64_t r_info, unsigned int *r_type, unsigned int *r_sym) get_rel_type_and_sym() argument
1477 section_rela(struct module *mod, struct elf_info *elf, Elf_Shdr *sechdr) section_rela() argument
1519 section_rel(struct module *mod, struct elf_info *elf, Elf_Shdr *sechdr) section_rel() argument
1575 check_sec_ref(struct module *mod, struct elf_info *elf) check_sec_ref() argument
[all...]
/kernel/linux/linux-5.10/arch/alpha/boot/tools/
H A Dobjstrip.c30 # include <linux/elf.h>
61 struct elfhdr *elf; in main() local
149 elf = (struct elfhdr *) buf; in main()
151 if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) { in main()
152 if (elf->e_type != ET_EXEC) { in main()
157 if (!elf_check_arch(elf)) { in main()
159 prog_name, elf->e_machine); in main()
162 if (elf->e_phnum != 1) { in main()
165 prog_name, elf->e_phnum); in main()
168 e_entry = elf in main()
[all...]
/kernel/linux/linux-6.6/arch/alpha/boot/tools/
H A Dobjstrip.c30 # include <linux/elf.h>
61 struct elfhdr *elf; in main() local
149 elf = (struct elfhdr *) buf; in main()
151 if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) { in main()
152 if (elf->e_type != ET_EXEC) { in main()
157 if (!elf_check_arch(elf)) { in main()
159 prog_name, elf->e_machine); in main()
162 if (elf->e_phnum != 1) { in main()
165 prog_name, elf->e_phnum); in main()
168 e_entry = elf in main()
[all...]
/kernel/linux/linux-5.10/arch/loongarch/tools/
H A DMakefile2 hostprogs := elf-entry
3 PHONY += elf-entry
4 elf-entry: $(obj)/elf-entry
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/
H A Dopal-core.c14 #include <linux/elf.h>
308 Elf64_Ehdr *elf; in create_opalcore() local
355 elf = (Elf64_Ehdr *)bufp; in create_opalcore()
357 memcpy(elf->e_ident, ELFMAG, SELFMAG); in create_opalcore()
358 elf->e_ident[EI_CLASS] = ELF_CLASS; in create_opalcore()
359 elf->e_ident[EI_DATA] = ELFDATA2MSB; in create_opalcore()
360 elf->e_ident[EI_VERSION] = EV_CURRENT; in create_opalcore()
361 elf->e_ident[EI_OSABI] = ELF_OSABI; in create_opalcore()
362 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in create_opalcore()
363 elf in create_opalcore()
[all...]
/kernel/linux/linux-6.6/arch/powerpc/platforms/powernv/
H A Dopal-core.c14 #include <linux/elf.h>
308 Elf64_Ehdr *elf; in create_opalcore() local
357 elf = (Elf64_Ehdr *)bufp; in create_opalcore()
359 memcpy(elf->e_ident, ELFMAG, SELFMAG); in create_opalcore()
360 elf->e_ident[EI_CLASS] = ELF_CLASS; in create_opalcore()
361 elf->e_ident[EI_DATA] = ELFDATA2MSB; in create_opalcore()
362 elf->e_ident[EI_VERSION] = EV_CURRENT; in create_opalcore()
363 elf->e_ident[EI_OSABI] = ELF_OSABI; in create_opalcore()
364 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in create_opalcore()
365 elf in create_opalcore()
[all...]
/kernel/linux/linux-5.10/tools/bpf/resolve_btfids/
H A Dmain.c95 Elf *elf; member
261 /* Older libelf.h and glibc elf.h might not yet define the ELF compression types. */
276 static int compressed_section_fix(Elf *elf, Elf_Scn *scn, GElf_Shdr *sh) in compressed_section_fix() argument
278 int expected = gelf_getclass(elf) == ELFCLASS32 ? 4 : 8; in compressed_section_fix()
304 Elf *elf; in elf_collect() local
316 elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL); in elf_collect()
317 if (!elf) { in elf_collect()
324 obj->efile.elf = elf; in elf_collect()
326 elf_flagelf(elf, ELF_C_SE in elf_collect()
[all...]
/kernel/linux/linux-5.10/arch/mips/tools/
H A DMakefile2 hostprogs := elf-entry
3 PHONY += elf-entry
4 elf-entry: $(obj)/elf-entry
/kernel/linux/linux-6.6/arch/mips/tools/
H A DMakefile2 hostprogs := elf-entry
3 PHONY += elf-entry
4 elf-entry: $(obj)/elf-entry
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/
H A Dtrace_helpers.c276 Elf *elf = NULL; in read_build_id() local
289 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in read_build_id()
290 if (!elf) in read_build_id()
292 if (elf_kind(elf) != ELF_K_ELF) in read_build_id()
294 if (!gelf_getehdr(elf, &ehdr)) in read_build_id()
301 phdr = gelf_getphdr(elf, i, &mem); in read_build_id()
306 data = elf_rawfile(elf, &max); in read_build_id()
317 if (elf) in read_build_id()
318 elf_end(elf); in read_build_id()

Completed in 18 milliseconds

12345678910>>...26