Home
last modified time | relevance | path

Searched refs:elf (Results 1 – 25 of 279) sorted by relevance

12345678910>>...12

/openbmc/linux/tools/objtool/
H A Delf.c32 #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, unsigned int idx) in find_symbol_by_index() argument
256 struct symbol *find_symbol_by_name(const struct elf *elf, const char *name) in find_symbol_by_name() argument
268 struct reloc *find_reloc_by_dest_range(const struct elf *elf, struct section *sec, in find_reloc_by_dest_range() argument
298 struct reloc *find_reloc_by_dest(const struct elf *elf, struct section *sec, unsigned long offset) in find_reloc_by_dest() argument
300 return find_reloc_by_dest_range(elf, sec, offset, 1); in find_reloc_by_dest()
308 static int read_sections(struct elf *elf) in read_sections() 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_idx, sh.sh_name); 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, entry, sec, idx, alt); in special_get_alts()
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()
/openbmc/openbmc/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/
H A D0003-kexec-elf-rel-use-our-elf.h.patch4 Subject: [PATCH] kexec-elf-rel: use our elf.h
8 kexec-elf-rel.c: In function 'elf_rel_load':
9 kexec-elf-rel.c:386:39: error: 'STT_NOTYPE' undeclared
17 kexec/arch/arm/kexec-elf-rel-arm.c | 2 +-
18 kexec/arch/i386/kexec-elf-rel-x86.c | 2 +-
19 kexec/arch/ppc/kexec-elf-rel-ppc.c | 2 +-
20 kexec/arch/ppc64/kexec-elf-rel-ppc64.c | 2 +-
21 kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 2 +-
22 kexec/kexec-elf-rel.c | 2 +-
25 diff --git a/kexec/arch/arm/kexec-elf-rel-arm.c b/kexec/arch/arm/kexec-elf-rel-arm.c
[all …]
H A D0004-kexec-elf-exec.c-replace-with-our-err.h.patch4 Subject: [PATCH] kexec-elf-exec.c: replace with our elf.h
8 kexec-elf-exec.c: In function 'elf_exec_load':
15 kexec/kexec-elf-exec.c | 2 +-
18 diff --git a/kexec/kexec-elf-exec.c b/kexec/kexec-elf-exec.c
20 --- a/kexec/kexec-elf-exec.c
21 +++ b/kexec/kexec-elf-exec.c
26 -#include "elf.h"
27 +#include "../include/elf.h"
30 #include "kexec-elf.h"
/openbmc/linux/tools/objtool/include/objtool/
H A Delf.h81 struct elf { struct
82 Elf *elf; member
107 struct elf *elf_open_read(const char *name, int flags); argument
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, struct symbol *orig, long size);
117 struct reloc *elf_init_reloc_text_sym(struct elf *elf, struct section *sec,
123 struct reloc *elf_init_reloc_data_sym(struct elf *elf, struct section *sec,
129 int elf_write_insn(struct elf *elf, struct section *sec,
132 int elf_write(struct elf *elf);
[all …]
H A Dendianness.h15 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) \ argument
24 bool __need_bswap = need_bswap(elf); \
/openbmc/linux/scripts/mod/
H A Dsymsearch.c50 static unsigned int symbol_count(struct elf_info *elf) in symbol_count() argument
54 for (Elf_Sym *sym = elf->symtab_start; sym < elf->symtab_stop; sym++) { in symbol_count()
55 if (is_valid_name(elf, sym)) in symbol_count()
68 static void symsearch_populate(struct elf_info *elf, in symsearch_populate() argument
72 bool is_arm = (elf->hdr->e_machine == EM_ARM); in symsearch_populate()
74 for (Elf_Sym *sym = elf->symtab_start; sym < elf->symtab_stop; sym++) { in symsearch_populate()
75 if (is_valid_name(elf, sym)) { in symsearch_populate()
78 table->symbol_index = sym - elf->symtab_start; in symsearch_populate()
79 table->section_index = get_secindex(elf, sym); in symsearch_populate()
124 void symsearch_init(struct elf_info *elf) in symsearch_init() argument
[all …]
H A Dmodpost.c713 static const char *sym_name(struct elf_info *elf, Elf_Sym *sym) in sym_name() argument
716 return elf->strtab + sym->st_name; in sym_name()
776 static void check_section(const char *modname, struct elf_info *elf, in check_section() argument
779 const char *sec = sech_name(elf, sechdr); in check_section()
1020 static Elf_Sym *find_fromsym(struct elf_info *elf, Elf_Addr addr, in find_fromsym() argument
1023 return symsearch_find_nearest(elf, addr, secndx, false, ~0); in find_fromsym()
1026 static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) in find_tosym() argument
1031 if (is_valid_name(elf, sym)) in find_tosym()
1038 new_sym = symsearch_find_nearest(elf, addr, get_secindex(elf, sym), in find_tosym()
1043 static bool is_executable_section(struct elf_info *elf, unsigned int secndx) in is_executable_section() argument
[all …]
/openbmc/linux/arch/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c137 } 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.sh_table[idx]; in section_by_idx()
251 elf.path = path; in init_elf()
266 elf.begin = mmap(0, stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in init_elf()
267 if (elf.begin == MAP_FAILED) { in init_elf()
[all …]
/openbmc/openbmc/poky/meta/recipes-core/glibc/glibc/
H A D0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch18 elf/dl-cache.c | 4 ++++
19 elf/dl-load.c | 4 ++--
20 elf/dl-usage.c | 6 ++++--
21 elf/interp.c | 2 +-
22 elf/ldconfig.c | 2 ++
23 elf/rtld.c | 1 +
28 diff --git a/elf/dl-cache.c b/elf/dl-cache.c
30 --- a/elf/dl-cache.c
31 +++ b/elf/dl-cache.c
43 diff --git a/elf/dl-load.c b/elf/dl-load.c
[all …]
/openbmc/qemu/tests/multiboot/
H A Drun_test.sh55 run_qemu mmap.elf
56 run_qemu mmap.elf -m 1.1M
57 run_qemu mmap.elf -m 2G
58 run_qemu mmap.elf -m 4G
59 run_qemu mmap.elf -m 8G
63 run_qemu modules.elf
64 run_qemu modules.elf -initrd module.txt
65 run_qemu modules.elf -initrd "module.txt argument"
66 run_qemu modules.elf -initrd "module.txt argument,,with,,commas"
67 run_qemu modules.elf -initrd "module.txt,module.txt argument,module.txt"
/openbmc/linux/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
[all …]
/openbmc/u-boot/tools/binman/
H A Delf_test.py11 import elf
57 syms = elf.GetSymbols(fname, [])
63 syms = elf.GetSymbols(fname, ['ucode'])
65 syms = elf.GetSymbols(fname, ['missing'])
67 syms = elf.GetSymbols(fname, ['missing', 'ucode'])
75 syms = elf.LookupAndWriteSymbols('missing-file', entry, section)
85 syms = elf.LookupAndWriteSymbols(elf_fname, entry, section)
98 self.assertEqual(elf.LookupAndWriteSymbols(elf_fname, entry, section),
111 syms = elf.LookupAndWriteSymbols(elf_fname, entry, section)
124 syms = elf.LookupAndWriteSymbols(elf_fname, entry, section)
[all …]
/openbmc/linux/tools/lib/bpf/
H A Delf.c17 Elf *elf; in elf_open() local
30 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); in elf_open()
31 if (!elf) { in elf_open()
37 elf_fd->elf = elf; in elf_open()
45 elf_end(elf_fd->elf); in elf_close()
50 static Elf_Scn *elf_find_next_scn_by_type(Elf *elf, int sh_type, Elf_Scn *scn) in elf_find_next_scn_by_type() argument
52 while ((scn = elf_nextscn(elf, scn)) != NULL) { in elf_find_next_scn_by_type()
70 Elf *elf; member
80 Elf *elf, const char *binary_path, in elf_sym_iter_new() argument
89 if (!gelf_getehdr(elf, &ehdr)) { in elf_sym_iter_new()
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/sdk/
H A Dcase.py41 import oe.qa, oe.elf
47 machine_data = oe.elf.machine_dict(None)[target_os][target_arch]
50 elf = oe.qa.ELFFile(path)
51 elf.open()
53 self.assertEqual(machine, elf.machine(),
55 … (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine)))
56 self.assertEqual(bits, elf.abiSize())
57 self.assertEqual(endian, elf.isLittleEndian())
/openbmc/linux/arch/powerpc/platforms/powernv/
H A Dopal-core.c308 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->e_type = cpu_to_be16(ET_CORE); in create_opalcore()
366 elf->e_machine = cpu_to_be16(ELF_ARCH); in create_opalcore()
[all …]
/openbmc/linux/arch/alpha/boot/tools/
H A Dobjstrip.c61 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->e_entry; in main()
170 lseek(fd, elf->e_phoff, SEEK_SET); in main()
/openbmc/qemu/docs/system/
H A Dtarget-avr.rst14 https://github.com/seharris/qemu-avr-tests/blob/master/free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf
17 Following are examples of possible usages, assuming demo.elf is compiled for
22 qemu-system-avr -machine mega2560 -bios demo.elf
26 qemu-system-avr -M mega2560 -bios demo.elf -nographic \
35 qemu-system-avr -machine mega2560 -bios demo.elf -s -S
39 avr-gdb demo.elf
48 qemu-system-avr -machine mega2560 -bios demo.elf -d in_asm
/openbmc/linux/arch/mips/tools/
H A DMakefile2 hostprogs := elf-entry
3 PHONY += elf-entry
4 elf-entry: $(obj)/elf-entry
/openbmc/linux/tools/bpf/resolve_btfids/
H A Dmain.c121 Elf *elf; member
305 static int compressed_section_fix(Elf *elf, Elf_Scn *scn, GElf_Shdr *sh) in compressed_section_fix() argument
307 int expected = gelf_getclass(elf) == ELFCLASS32 ? 4 : 8; in compressed_section_fix()
334 Elf *elf; in elf_collect() local
346 elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL); in elf_collect()
347 if (!elf) { in elf_collect()
355 obj->efile.elf = elf; in elf_collect()
357 elf_flagelf(elf, ELF_C_SET, ELF_F_LAYOUT); in elf_collect()
359 if (elf_getshdrstrndx(elf, &shdrstrndx) != 0) { in elf_collect()
364 if (gelf_getehdr(obj->efile.elf, &ehdr) == NULL) { in elf_collect()
[all …]
/openbmc/openbmc/poky/meta/recipes-core/picolibc/
H A Dpicolibc-helloworld_git.bb7 QB_DEFAULT_KERNEL ?= "${IMAGE_LINK_NAME}.elf"
27 …NKERSCRIPT} -specs=picolibc.specs --oslib=semihost -o ${BAREMETAL_BINNAME}.elf ${S}/hello-world/he…
28 ${OBJCOPY} -O binary ${BAREMETAL_BINNAME}.elf ${BAREMETAL_BINNAME}.bin
33 … install -m 755 ${B}/${BAREMETAL_BINNAME}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf
38 ${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf \
/openbmc/openbmc/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/
H A Dremove.ldconfig.call.patch18 lib/Makefile.elf-lib | 3 ---
21 diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib
23 --- a/lib/Makefile.elf-lib
24 +++ b/lib/Makefile.elf-lib
25 @@ -50,8 +50,6 @@ install-shlibs install:: $(ELF_LIB) installdirs-elf-lib $(DEP_INSTALL_SYMLINK)
/openbmc/openbmc/poky/meta/recipes-devtools/syslinux/syslinux/
H A D0010-Workaround-multiple-definition-of-symbol-errors.patch27 libmenu/libmenu.elf: $(LIBMENU)
28 - $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) \
29 + $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) \
40 ldlinux.elf : $(OBJS)
53 libgpl.elf : $(LIBOBJS)
54 - $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^
55 + $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^
66 hdt.elf : $(OBJS) $(LIBS) $(C_LIBS)
77 NASM_ELF = elf
79 %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS)

12345678910>>...12