Home
last modified time | relevance | path

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

/linux-4.1.27/tools/perf/util/
Dsymbol-elf.c41 static int elf_getphdrnum(Elf *elf, size_t *dst) in elf_getphdrnum() argument
46 ehdr = gelf_getehdr(elf, &gehdr); in elf_getphdrnum()
153 static size_t elf_addr_to_index(Elf *elf, GElf_Addr addr) in elf_addr_to_index() argument
159 while ((sec = elf_nextscn(elf, sec)) != NULL) { in elf_addr_to_index()
172 Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, in elf_section_by_name() argument
179 if (!elf_rawdata(elf_getscn(elf, ep->e_shstrndx), NULL)) in elf_section_by_name()
182 while ((sec = elf_nextscn(elf, sec)) != NULL) { in elf_section_by_name()
186 str = elf_strptr(elf, ep->e_shstrndx, shp->sh_name); in elf_section_by_name()
229 Elf *elf; in dso__synthesize_plt_symbols() local
235 elf = ss->elf; in dso__synthesize_plt_symbols()
[all …]
Dunwind-libunwind.c165 Elf *elf; in elf_section_offset() local
170 elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); in elf_section_offset()
171 if (elf == NULL) in elf_section_offset()
175 if (gelf_getehdr(elf, &ehdr) == NULL) in elf_section_offset()
178 if (!elf_section_by_name(elf, &ehdr, &shdr, name, NULL)) in elf_section_offset()
184 elf_end(elf); in elf_section_offset()
191 Elf *elf; in elf_is_exec() local
195 elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); in elf_is_exec()
196 if (elf == NULL) in elf_is_exec()
198 if (gelf_getehdr(elf, &ehdr) == NULL) in elf_is_exec()
[all …]
Dsymbol.h37 extern Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep,
203 Elf *elf; member
Dprobe-finder.c1007 Elf *elf; in debuginfo__find_probes() local
1012 elf = dwarf_getelf(dbg->dbg); in debuginfo__find_probes()
1013 if (elf == NULL) in debuginfo__find_probes()
1016 if (gelf_getehdr(elf, &ehdr) == NULL) in debuginfo__find_probes()
1019 if (elf_section_by_name(elf, &ehdr, &shdr, ".eh_frame", NULL) && in debuginfo__find_probes()
1021 pf->cfi = dwarf_getcfi_elf(elf); in debuginfo__find_probes()
Dprobe-event.c419 Elf *elf; in get_text_start_address() local
428 elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); in get_text_start_address()
429 if (elf == NULL) in get_text_start_address()
432 if (gelf_getehdr(elf, &ehdr) == NULL) in get_text_start_address()
435 if (!elf_section_by_name(elf, &ehdr, &shdr, ".text", NULL)) in get_text_start_address()
441 elf_end(elf); in get_text_start_address()
DBuild78 libperf-$(CONFIG_LIBELF) += symbol-elf.o
/linux-4.1.27/scripts/mod/
Dmodpost.c263 static const char *sec_name(struct elf_info *elf, int secindex);
267 static enum export export_from_secname(struct elf_info *elf, unsigned int sec) in export_from_secname() argument
269 const char *secname = sec_name(elf, sec); in export_from_secname()
285 static enum export export_from_sec(struct elf_info *elf, unsigned int sec) in export_from_sec() argument
287 if (sec == elf->export_sec) in export_from_sec()
289 else if (sec == elf->export_unused_sec) in export_from_sec()
291 else if (sec == elf->export_gpl_sec) in export_from_sec()
293 else if (sec == elf->export_unused_gpl_sec) in export_from_sec()
295 else if (sec == elf->export_gpl_future_sec) in export_from_sec()
752 static const char *sym_name(struct elf_info *elf, Elf_Sym *sym) in sym_name() argument
[all …]
/linux-4.1.27/arch/ia64/hp/sim/boot/
Dbootloader.c63 struct elfhdr *elf; in start_bootloader() local
113 elf = (struct elfhdr *) mem; in start_bootloader()
114 if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) != 0) { in start_bootloader()
118 if (elf->e_type != ET_EXEC) { in start_bootloader()
122 if (!elf_check_arch(elf)) { in start_bootloader()
127 e_entry = elf->e_entry; in start_bootloader()
128 e_phnum = elf->e_phnum; in start_bootloader()
129 e_phoff = elf->e_phoff; in start_bootloader()
/linux-4.1.27/arch/alpha/boot/tools/
Dobjstrip.c60 struct elfhdr *elf; in main() local
148 elf = (struct elfhdr *) buf; in main()
150 if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) { in main()
151 if (elf->e_type != ET_EXEC) { in main()
156 if (!elf_check_arch(elf)) { in main()
158 prog_name, elf->e_machine); in main()
161 if (elf->e_phnum != 1) { in main()
164 prog_name, elf->e_phnum); in main()
167 e_entry = elf->e_entry; in main()
169 lseek(fd, elf->e_phoff, SEEK_SET); in main()
/linux-4.1.27/fs/proc/
Dkcore.c324 struct elfhdr *elf; in elf_kcore_store_hdr() local
330 elf = (struct elfhdr *) bufp; in elf_kcore_store_hdr()
333 memcpy(elf->e_ident, ELFMAG, SELFMAG); in elf_kcore_store_hdr()
334 elf->e_ident[EI_CLASS] = ELF_CLASS; in elf_kcore_store_hdr()
335 elf->e_ident[EI_DATA] = ELF_DATA; in elf_kcore_store_hdr()
336 elf->e_ident[EI_VERSION]= EV_CURRENT; in elf_kcore_store_hdr()
337 elf->e_ident[EI_OSABI] = ELF_OSABI; in elf_kcore_store_hdr()
338 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in elf_kcore_store_hdr()
339 elf->e_type = ET_CORE; in elf_kcore_store_hdr()
340 elf->e_machine = ELF_ARCH; in elf_kcore_store_hdr()
[all …]
/linux-4.1.27/samples/bpf/
Dbpf_load.c137 static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname, in get_sec() argument
142 scn = elf_getscn(elf, i); in get_sec()
149 *shname = elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name); in get_sec()
193 Elf *elf; in load_bpf_file() local
206 elf = elf_begin(fd, ELF_C_READ, NULL); in load_bpf_file()
208 if (!elf) in load_bpf_file()
211 if (gelf_getehdr(elf, &ehdr) != &ehdr) in load_bpf_file()
220 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in load_bpf_file()
251 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in load_bpf_file()
256 if (get_sec(elf, shdr.sh_info, &ehdr, &shname_prog, in load_bpf_file()
[all …]
/linux-4.1.27/arch/powerpc/kernel/
Dfadump.c529 struct elfhdr *elf; in fadump_update_elfcore_header() local
532 elf = (struct elfhdr *)bufp; in fadump_update_elfcore_header()
765 struct elfhdr *elf; in fadump_init_elfcore_header() local
767 elf = (struct elfhdr *) bufp; in fadump_init_elfcore_header()
769 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fadump_init_elfcore_header()
770 elf->e_ident[EI_CLASS] = ELF_CLASS; in fadump_init_elfcore_header()
771 elf->e_ident[EI_DATA] = ELF_DATA; in fadump_init_elfcore_header()
772 elf->e_ident[EI_VERSION] = EV_CURRENT; in fadump_init_elfcore_header()
773 elf->e_ident[EI_OSABI] = ELF_OSABI; in fadump_init_elfcore_header()
774 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fadump_init_elfcore_header()
[all …]
/linux-4.1.27/arch/xtensa/boot/
DMakefile24 bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
25 bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
26 bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
42 boot-elf: vmlinux.bin
/linux-4.1.27/arch/x86/realmode/rm/
DMakefile46 LDFLAGS_realmode.elf := --emit-relocs -T
49 targets += realmode.elf
50 $(obj)/realmode.elf: $(obj)/realmode.lds $(REALMODE_OBJS) FORCE
56 $(obj)/realmode.bin: $(obj)/realmode.elf $(obj)/realmode.relocs FORCE
64 $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
/linux-4.1.27/fs/
Dbinfmt_elf_fdpic.c1274 static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs) in fill_elf_fdpic_header() argument
1276 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_fdpic_header()
1277 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_fdpic_header()
1278 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_fdpic_header()
1279 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_fdpic_header()
1280 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_fdpic_header()
1281 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fill_elf_fdpic_header()
1283 elf->e_type = ET_CORE; in fill_elf_fdpic_header()
1284 elf->e_machine = ELF_ARCH; in fill_elf_fdpic_header()
1285 elf->e_version = EV_CURRENT; in fill_elf_fdpic_header()
[all …]
Dbinfmt_elf.c482 struct file *elf, bool is_interp, in arch_elf_pt_proc() argument
1343 static void fill_elf_header(struct elfhdr *elf, int segs, in fill_elf_header() argument
1346 memset(elf, 0, sizeof(*elf)); in fill_elf_header()
1348 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_header()
1349 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_header()
1350 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_header()
1351 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_header()
1352 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_header()
1354 elf->e_type = ET_CORE; in fill_elf_header()
1355 elf->e_machine = machine; in fill_elf_header()
[all …]
/linux-4.1.27/arch/avr32/
DMakefile10 all: uImage vmlinux.elf
46 BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec
53 vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf
63 vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux
/linux-4.1.27/arch/avr32/boot/images/
DMakefile31 OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \
44 $(obj)/vmlinux.elf: vmlinux FORCE
50 $(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE
57 clean-files := vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec
/linux-4.1.27/arch/xtensa/boot/boot-redboot/
DMakefile28 $(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
29 $(Q)$(LD) $(LD_ARGS) -o $@ $^ -L/xtensa-elf/lib $(LIBGCC)
31 $(obj)/../zImage.redboot: $(obj)/zImage.elf
/linux-4.1.27/tools/build/feature/
Dtest-libelf.c5 Elf *elf = elf_begin(0, ELF_C_READ, 0); in main() local
7 return (long)elf; in main()
Dtest-libelf-mmap.c5 Elf *elf = elf_begin(0, ELF_C_READ_MMAP, 0); in main() local
7 return (long)elf; in main()
/linux-4.1.27/arch/xtensa/boot/boot-elf/
DMakefile27 $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
34 zImage: $(obj)/../Image.elf
/linux-4.1.27/arch/mips/kernel/
Delf.c68 int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, in arch_elf_pt_proc() argument
95 ret = kernel_read(elf, phdr32->p_offset, in arch_elf_pt_proc()
104 ret = kernel_read(elf, phdr64->p_offset, in arch_elf_pt_proc()
DMakefile7 obj-y += cpu-probe.o branch.o elf.o entry.o genex.o idle.o irq.o \
/linux-4.1.27/arch/x86/boot/
DMakefile21 targets := vmlinux.bin setup.bin setup.elf bzImage
102 LDFLAGS_setup.elf := -T
103 $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
107 $(obj)/setup.bin: $(obj)/setup.elf FORCE
D.gitignore9 setup.elf
/linux-4.1.27/Documentation/
Ddontdiff11 *.elf
218 setup.elf
256 wakeup.elf
Dkernel-parameters.txt1088 image elf header and optionally the size. Generally
/linux-4.1.27/arch/nios2/include/uapi/asm/
DKbuild3 header-y += elf.h
/linux-4.1.27/arch/arc/include/uapi/asm/
DKbuild3 header-y += elf.h
/linux-4.1.27/arch/tile/mm/
DMakefile5 obj-y := init.o pgtable.o fault.o extable.o elf.o \
/linux-4.1.27/arch/frv/mm/
DMakefile9 mmu-context.o dma-alloc.o elf-fdpic.o
/linux-4.1.27/arch/openrisc/include/uapi/asm/
DKbuild5 header-y += elf.h
/linux-4.1.27/arch/unicore32/kernel/
DMakefile6 obj-y := dma.o elf.o entry.o process.o ptrace.o
/linux-4.1.27/include/linux/
Delfnote.h73 struct elf##size##_note _nhdr; \
/linux-4.1.27/arch/microblaze/include/uapi/asm/
DKbuild9 header-y += elf.h
/linux-4.1.27/arch/powerpc/include/uapi/asm/
DKbuild9 header-y += elf.h
/linux-4.1.27/
D.gitignore25 *.elf
DCREDITS2266 D: sun4/330 port, capabilities for elf, speedup for rm on ext2, USB,
2502 D: Linux Emacs elf/qmagic support + other libc/gcc things
/linux-4.1.27/arch/powerpc/boot/
Dwrapper408 mv "$ofile" "$ofile".elf
409 ${CROSS}objcopy -O binary "$ofile".elf "$ofile"
/linux-4.1.27/arch/powerpc/
DMakefile91 override LD += -m elf$(CONFIG_WORD_SIZE)$(LDEMULATION)
93 override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-$(GNUTARGET) $(AR)
/linux-4.1.27/arch/arm/kernel/
DMakefile18 obj-y := elf.o entry-common.o irq.o opcodes.o \
/linux-4.1.27/Documentation/ABI/testing/
Dsysfs-class-mic.txt129 b) elf - Boot an elf image for flash updates.
/linux-4.1.27/include/uapi/linux/
DKbuild111 header-y += elf-em.h
112 header-y += elf-fdpic.h
113 header-y += elf.h
/linux-4.1.27/arch/mips/include/asm/
Delf.h439 extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf,
/linux-4.1.27/Documentation/powerpc/
Dbootwrapper.txt44 output image file can be either an elf file or a flat
/linux-4.1.27/Documentation/ia64/
Dfsys.txt275 values passed via the ELF auxiliary vector (include/asm-ia64/elf.h)
/linux-4.1.27/arch/
DKconfig192 # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
/linux-4.1.27/arch/mips/
DKconfig2167 Includes a loader for loading an elf relocatable object