Home
last modified time | relevance | path

Searched refs:shdr (Results 1 – 25 of 54) sorted by relevance

123

/Linux-v6.1/tools/perf/util/
Dgenelf.c165 Elf_Shdr *shdr; in jit_add_eh_frame_info() local
190 shdr = elf_getshdr(scn); in jit_add_eh_frame_info()
191 if (!shdr) { in jit_add_eh_frame_info()
196 shdr->sh_name = 104; in jit_add_eh_frame_info()
197 shdr->sh_type = SHT_PROGBITS; in jit_add_eh_frame_info()
198 shdr->sh_addr = base_offset; in jit_add_eh_frame_info()
199 shdr->sh_flags = SHF_ALLOC; in jit_add_eh_frame_info()
200 shdr->sh_entsize = 0; in jit_add_eh_frame_info()
224 shdr = elf_getshdr(scn); in jit_add_eh_frame_info()
225 if (!shdr) { in jit_add_eh_frame_info()
[all …]
Dgenelf_debug.c488 Elf_Shdr *shdr; in jit_add_debug_info() local
521 shdr = elf_getshdr(scn); in jit_add_debug_info()
522 if (!shdr) { in jit_add_debug_info()
527 shdr->sh_name = 52; /* .debug_line */ in jit_add_debug_info()
528 shdr->sh_type = SHT_PROGBITS; in jit_add_debug_info()
529 shdr->sh_addr = 0; /* must be zero or == sh_offset -> dynamic object */ in jit_add_debug_info()
530 shdr->sh_flags = 0; in jit_add_debug_info()
531 shdr->sh_entsize = 0; in jit_add_debug_info()
555 shdr = elf_getshdr(scn); in jit_add_debug_info()
556 if (!shdr) { in jit_add_debug_info()
[all …]
Dsymbol-elf.c167 static inline const char *elf_sec__name(const GElf_Shdr *shdr, in elf_sec__name() argument
170 return secstrs->d_buf + shdr->sh_name; in elf_sec__name()
173 static inline int elf_sec__is_text(const GElf_Shdr *shdr, in elf_sec__is_text() argument
176 return strstr(elf_sec__name(shdr, secstrs), "text") != NULL; in elf_sec__is_text()
179 static inline bool elf_sec__is_data(const GElf_Shdr *shdr, in elf_sec__is_data() argument
182 return strstr(elf_sec__name(shdr, secstrs), "data") != NULL; in elf_sec__is_data()
185 static bool elf_sec__filter(GElf_Shdr *shdr, Elf_Data *secstrs) in elf_sec__filter() argument
187 return elf_sec__is_text(shdr, secstrs) || in elf_sec__filter()
188 elf_sec__is_data(shdr, secstrs); in elf_sec__filter()
194 GElf_Shdr shdr; in elf_addr_to_index() local
[all …]
/Linux-v6.1/arch/mips/boot/tools/
Drelocs.c25 Elf_Shdr shdr; member
98 name = sec_strtab + secs[shndx].shdr.sh_name; in sec_name()
263 Elf_Shdr shdr; in read_shdrs() local
276 if (fread(&shdr, sizeof(shdr), 1, fp) != 1) in read_shdrs()
279 sec->shdr.sh_name = elf_word_to_cpu(shdr.sh_name); in read_shdrs()
280 sec->shdr.sh_type = elf_word_to_cpu(shdr.sh_type); in read_shdrs()
281 sec->shdr.sh_flags = elf_xword_to_cpu(shdr.sh_flags); in read_shdrs()
282 sec->shdr.sh_addr = elf_addr_to_cpu(shdr.sh_addr); in read_shdrs()
283 sec->shdr.sh_offset = elf_off_to_cpu(shdr.sh_offset); in read_shdrs()
284 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs()
[all …]
/Linux-v6.1/drivers/media/platform/qcom/venus/
Dhfi_cmds.c168 pkt->shdr.hdr.size = sizeof(*pkt); in pkt_session_init()
169 pkt->shdr.hdr.pkt_type = HFI_CMD_SYS_SESSION_INIT; in pkt_session_init()
170 pkt->shdr.session_id = hash32_ptr(cookie); in pkt_session_init()
179 pkt->shdr.hdr.size = sizeof(*pkt); in pkt_session_cmd()
180 pkt->shdr.hdr.pkt_type = pkt_type; in pkt_session_cmd()
181 pkt->shdr.session_id = hash32_ptr(cookie); in pkt_session_cmd()
192 pkt->shdr.hdr.pkt_type = HFI_CMD_SESSION_SET_BUFFERS; in pkt_session_set_buffers()
193 pkt->shdr.session_id = hash32_ptr(cookie); in pkt_session_set_buffers()
203 pkt->shdr.hdr.size = sizeof(*pkt) - sizeof(u32) + in pkt_session_set_buffers()
212 pkt->shdr.hdr.size = sizeof(*pkt) + in pkt_session_set_buffers()
[all …]
Dhfi_msgs.h49 struct hfi_session_hdr_pkt shdr; member
81 struct hfi_session_hdr_pkt shdr; member
88 struct hfi_session_hdr_pkt shdr; member
93 struct hfi_session_hdr_pkt shdr; member
100 struct hfi_session_hdr_pkt shdr; member
121 struct hfi_session_hdr_pkt shdr; member
126 struct hfi_session_hdr_pkt shdr; member
131 struct hfi_session_hdr_pkt shdr; member
136 struct hfi_session_hdr_pkt shdr; member
141 struct hfi_session_hdr_pkt shdr; member
[all …]
Dhfi_cmds.h94 struct hfi_session_hdr_pkt shdr; member
100 struct hfi_session_hdr_pkt shdr; member
104 struct hfi_session_hdr_pkt shdr; member
108 struct hfi_session_hdr_pkt shdr; member
114 struct hfi_session_hdr_pkt shdr; member
124 struct hfi_session_hdr_pkt shdr; member
130 struct hfi_session_hdr_pkt shdr; member
134 struct hfi_session_hdr_pkt shdr; member
138 struct hfi_session_hdr_pkt shdr; member
142 struct hfi_session_hdr_pkt shdr; member
[all …]
/Linux-v6.1/arch/x86/tools/
Drelocs.c39 Elf_Shdr shdr; member
260 name = sec_strtab + secs[shndx].shdr.sh_name; in sec_name()
294 if (sec->shdr.sh_type != SHT_SYMTAB) in sym_lookup()
297 nsyms = sec->shdr.sh_size/sizeof(Elf_Sym); in sym_lookup()
417 Elf_Shdr shdr; in read_ehdr() local
422 if (fread(&shdr, sizeof(shdr), 1, fp) != 1) in read_ehdr()
426 shnum = elf_xword_to_cpu(shdr.sh_size); in read_ehdr()
429 shstrndx = elf_word_to_cpu(shdr.sh_link); in read_ehdr()
439 Elf_Shdr shdr; in read_shdrs() local
452 if (fread(&shdr, sizeof(shdr), 1, fp) != 1) in read_shdrs()
[all …]
/Linux-v6.1/arch/mips/vdso/
Dgenvdso.h11 ELF(Shdr) *shdr; in FUNC()
19 shdr = shdrs + (sh_entsize * swap_uint16(ehdr->e_shstrndx)); in FUNC()
20 shstrtab = vdso + FUNC(swap_uint)(shdr->sh_offset); in FUNC()
23 shdr = shdrs + (i * sh_entsize); in FUNC()
24 name = shstrtab + swap_uint32(shdr->sh_name); in FUNC()
31 switch (swap_uint32(shdr->sh_type)) { in FUNC()
50 shdr->sh_type = swap_uint32(SHT_MIPS_ABIFLAGS); in FUNC()
51 shdr->sh_entsize = shdr->sh_size; in FUNC()
62 ELF(Shdr) *shdr; in FUNC()
74 shdr = shdrs + (i * sh_entsize); in FUNC()
[all …]
/Linux-v6.1/arch/riscv/kernel/
Dmodule-sections.c23 got = (struct got_entry *)got_sec->shdr->sh_addr; in module_emit_got_entry()
44 got_plt = (struct got_entry *)got_plt_sec->shdr->sh_addr; in module_emit_plt_entry()
46 plt = (struct plt_entry *)plt_sec->shdr->sh_addr; in module_emit_plt_entry()
102 mod->arch.plt.shdr = sechdrs + i; in module_frob_arch_sections()
104 mod->arch.got.shdr = sechdrs + i; in module_frob_arch_sections()
106 mod->arch.got_plt.shdr = sechdrs + i; in module_frob_arch_sections()
109 if (!mod->arch.plt.shdr) { in module_frob_arch_sections()
113 if (!mod->arch.got.shdr) { in module_frob_arch_sections()
117 if (!mod->arch.got_plt.shdr) { in module_frob_arch_sections()
138 mod->arch.plt.shdr->sh_type = SHT_NOBITS; in module_frob_arch_sections()
[all …]
/Linux-v6.1/arch/loongarch/kernel/
Dmodule-sections.c20 got = (struct got_entry *)got_sec->shdr->sh_addr; in module_emit_got_entry()
50 plt = (struct plt_entry *)plt_sec->shdr->sh_addr; in module_emit_plt_entry()
52 plt_idx = (struct plt_idx_entry *)plt_idx_sec->shdr->sh_addr; in module_emit_plt_entry()
112 mod->arch.got.shdr = sechdrs + i; in module_frob_arch_sections()
114 mod->arch.plt.shdr = sechdrs + i; in module_frob_arch_sections()
116 mod->arch.plt_idx.shdr = sechdrs + i; in module_frob_arch_sections()
119 if (!mod->arch.got.shdr) { in module_frob_arch_sections()
123 if (!mod->arch.plt.shdr) { in module_frob_arch_sections()
127 if (!mod->arch.plt_idx.shdr) { in module_frob_arch_sections()
148 mod->arch.got.shdr->sh_type = SHT_NOBITS; in module_frob_arch_sections()
[all …]
/Linux-v6.1/fs/cifs/
Dsmb2misc.c22 check_smb2_hdr(struct smb2_hdr *shdr, __u64 mid) in check_smb2_hdr() argument
24 __u64 wire_mid = le64_to_cpu(shdr->MessageId); in check_smb2_hdr()
30 if ((shdr->ProtocolId == SMB2_PROTO_NUMBER) && in check_smb2_hdr()
32 if (shdr->Flags & SMB2_FLAGS_SERVER_TO_REDIR) in check_smb2_hdr()
36 if (shdr->Command == SMB2_OPLOCK_BREAK) in check_smb2_hdr()
42 if (shdr->ProtocolId != SMB2_PROTO_NUMBER) in check_smb2_hdr()
44 le32_to_cpu(shdr->ProtocolId)); in check_smb2_hdr()
139 struct smb2_hdr *shdr = (struct smb2_hdr *)buf; in smb2_check_message() local
140 struct smb2_pdu *pdu = (struct smb2_pdu *)shdr; in smb2_check_message()
154 if (shdr->ProtocolId == SMB2_TRANSFORM_PROTO_NUM) { in smb2_check_message()
[all …]
Dsmb2transport.c221 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; in smb2_calc_signature() local
226 ses = smb2_find_smb_ses(server, le64_to_cpu(shdr->SessionId)); in smb2_calc_signature()
233 memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE); in smb2_calc_signature()
284 memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE); in smb2_calc_signature()
542 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; in smb3_calc_signature() local
547 rc = smb2_get_sign_key(le64_to_cpu(shdr->SessionId), server, key); in smb3_calc_signature()
562 memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE); in smb3_calc_signature()
603 memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE); in smb3_calc_signature()
616 struct smb2_hdr *shdr; in smb2_sign_rqst() local
621 shdr = (struct smb2_hdr *)rqst->rq_iov[0].iov_base; in smb2_sign_rqst()
[all …]
/Linux-v6.1/tools/lib/bpf/
Dlinker.c42 Elf64_Shdr *shdr; member
111 Elf64_Shdr *shdr; member
286 symtab->shdr->sh_size += sizeof(*sym); in add_new_sym()
351 sec->shdr = elf64_getshdr(sec->scn); in init_output_elf()
352 if (!sec->shdr) in init_output_elf()
369 sec->shdr->sh_name = str_off; in init_output_elf()
370 sec->shdr->sh_type = SHT_STRTAB; in init_output_elf()
371 sec->shdr->sh_flags = SHF_STRINGS; in init_output_elf()
372 sec->shdr->sh_offset = 0; in init_output_elf()
373 sec->shdr->sh_link = 0; in init_output_elf()
[all …]
/Linux-v6.1/drivers/remoteproc/
Dremoteproc_elf_loader.c250 const void *shdr, *name_table_shdr; local
264 shdr = elf_data + elf_hdr_get_e_shoff(class, ehdr);
266 name_table_shdr = shdr + (shstrndx * elf_shdr_get_size);
270 for (i = 0; i < shnum; i++, shdr += elf_shdr_get_size) {
271 u64 size = elf_shdr_get_sh_size(class, shdr);
272 u64 offset = elf_shdr_get_sh_offset(class, shdr);
273 u32 name = elf_shdr_get_sh_name(class, shdr);
310 return shdr;
328 const void *shdr; local
336 shdr = find_table(dev, fw);
[all …]
Dremoteproc_coredump.c346 void *shdr; in rproc_coredump_using_sections() local
412 shdr = data + elf_hdr_get_e_shoff(class, ehdr); in rproc_coredump_using_sections()
413 memset(shdr, 0, elf_size_of_shdr(class)); in rproc_coredump_using_sections()
414 shdr += elf_size_of_shdr(class); in rproc_coredump_using_sections()
422 memset(shdr, 0, elf_size_of_shdr(class)); in rproc_coredump_using_sections()
423 elf_shdr_set_sh_type(class, shdr, SHT_STRTAB); in rproc_coredump_using_sections()
424 elf_shdr_set_sh_offset(class, shdr, offset); in rproc_coredump_using_sections()
425 elf_shdr_set_sh_size(class, shdr, strtbl_size); in rproc_coredump_using_sections()
426 elf_shdr_set_sh_entsize(class, shdr, 0); in rproc_coredump_using_sections()
427 elf_shdr_set_sh_flags(class, shdr, 0); in rproc_coredump_using_sections()
[all …]
Dremoteproc_elf_helpers.h79 ELF_GEN_FIELD_GET_SET(shdr, sh_type, u32) in ELF_GEN_FIELD_GET_SET()
80 ELF_GEN_FIELD_GET_SET(shdr, sh_flags, u32) in ELF_GEN_FIELD_GET_SET()
81 ELF_GEN_FIELD_GET_SET(shdr, sh_entsize, u16) in ELF_GEN_FIELD_GET_SET()
82 ELF_GEN_FIELD_GET_SET(shdr, sh_size, u64) in ELF_GEN_FIELD_GET_SET()
83 ELF_GEN_FIELD_GET_SET(shdr, sh_offset, u64) in ELF_GEN_FIELD_GET_SET()
84 ELF_GEN_FIELD_GET_SET(shdr, sh_name, u32) in ELF_GEN_FIELD_GET_SET()
85 ELF_GEN_FIELD_GET_SET(shdr, sh_addr, u64) in ELF_GEN_FIELD_GET_SET()
96 ELF_STRUCT_SIZE(shdr)
103 void *shdr; local
107 shdr = ehdr + elf_size_of_hdr(class) + shstrndx * elf_size_of_shdr(class);
[all …]
Dpru_rproc.c650 struct elf32_shdr *shdr, *name_table_shdr; in pru_rproc_find_interrupt_map() local
659 shdr = (struct elf32_shdr *)(elf_data + ehdr->e_shoff); in pru_rproc_find_interrupt_map()
661 name_table_shdr = shdr + shstrndx; in pru_rproc_find_interrupt_map()
665 for (i = 0; i < shnum; i++, shdr++) { in pru_rproc_find_interrupt_map()
666 u32 size = shdr->sh_size; in pru_rproc_find_interrupt_map()
667 u32 offset = shdr->sh_offset; in pru_rproc_find_interrupt_map()
668 u32 name = shdr->sh_name; in pru_rproc_find_interrupt_map()
685 return shdr; in pru_rproc_find_interrupt_map()
708 const void *shdr; in pru_rproc_parse_fw() local
721 shdr = pru_rproc_find_interrupt_map(dev, fw); in pru_rproc_parse_fw()
[all …]
/Linux-v6.1/arch/powerpc/boot/
Dhack-coff.c35 struct external_scnhdr shdr; in main() local
57 if (read(fd, &shdr, sizeof(shdr)) != sizeof(shdr)) in main()
59 if (strcmp(shdr.s_name, ".text") == 0) { in main()
62 } else if (strcmp(shdr.s_name, ".data") == 0) { in main()
64 } else if (strcmp(shdr.s_name, ".bss") == 0) { in main()
/Linux-v6.1/arch/arm64/kvm/hyp/nvhe/
Dgen-hyprel.c205 #define for_each_rela(shdr, var) \ argument
206 for (var = elf_ptr(Elf64_Rela, elf64toh(shdr->sh_offset)); \
207 var < elf_ptr(Elf64_Rela, elf64toh(shdr->sh_offset) + elf64toh(shdr->sh_size)); var++)
216 static inline const char *section_name(Elf64_Shdr *shdr) in section_name() argument
218 return elf.sh_string + elf32toh(shdr->sh_name); in section_name()
222 static inline const char *section_begin(Elf64_Shdr *shdr) in section_begin() argument
224 return elf_ptr(char, elf64toh(shdr->sh_offset)); in section_begin()
428 Elf64_Shdr *shdr; in emit_all_relocs() local
430 for_each_section(shdr) { in emit_all_relocs()
431 switch (elf32toh(shdr->sh_type)) { in emit_all_relocs()
[all …]
/Linux-v6.1/net/core/
Dselftests.c60 struct netsfhdr *shdr; in net_test_get_skb() local
110 uhdr->len = htons(sizeof(*shdr) + sizeof(*uhdr) + attr->size); in net_test_get_skb()
124 iplen = sizeof(*ihdr) + sizeof(*shdr) + attr->size; in net_test_get_skb()
141 shdr = skb_put(skb, sizeof(*shdr)); in net_test_get_skb()
142 shdr->version = 0; in net_test_get_skb()
143 shdr->magic = cpu_to_be64(NET_TEST_PKT_MAGIC); in net_test_get_skb()
145 shdr->id = net_test_next_id++; in net_test_get_skb()
178 struct netsfhdr *shdr; in net_test_loopback_validate() local
216 shdr = (struct netsfhdr *)((u8 *)thdr + sizeof(*thdr)); in net_test_loopback_validate()
225 shdr = (struct netsfhdr *)((u8 *)uhdr + sizeof(*uhdr)); in net_test_loopback_validate()
[all …]
/Linux-v6.1/arch/riscv/include/asm/
Dmodule.h15 Elf_Shdr *shdr; member
38 struct got_entry *got = (struct got_entry *)(sec->shdr->sh_addr); in get_got_entry()
91 struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr; in get_got_plt_idx()
104 struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr; in get_plt_entry()
/Linux-v6.1/arch/loongarch/include/asm/
Dmodule.h14 Elf_Shdr *shdr; member
68 struct plt_idx_entry *plt_idx = (struct plt_idx_entry *)sec->shdr->sh_addr; in get_plt_idx()
83 struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr; in get_plt_entry()
94 struct got_entry *got = (struct got_entry *)sec->shdr->sh_addr; in get_got_entry()
/Linux-v6.1/drivers/platform/x86/intel/ifs/
Dload.c205 const struct microcode_header_intel *shdr) in find_ifs_matching_signature() argument
209 mc_size = get_totalsize(shdr); in find_ifs_matching_signature()
211 if (!mc_size || ifs_sanity_check(dev, shdr) < 0) { in find_ifs_matching_signature()
216 if (!intel_cpu_signatures_match(uci->cpu_sig.sig, uci->cpu_sig.pf, shdr->sig, shdr->pf)) { in find_ifs_matching_signature()
/Linux-v6.1/kernel/module/
Dmain.c183 Elf_Shdr *shdr = &info->sechdrs[i]; in find_sec() local
185 if ((shdr->sh_flags & SHF_ALLOC) in find_sec()
186 && strcmp(info->secstrings + shdr->sh_name, name) == 0) in find_sec()
218 Elf_Shdr *shdr = &info->sechdrs[i]; in find_any_sec() local
219 if (strcmp(info->secstrings + shdr->sh_name, name) == 0) in find_any_sec()
1627 static int validate_section_offset(struct load_info *info, Elf_Shdr *shdr) in validate_section_offset() argument
1639 secend = shdr->sh_offset + shdr->sh_size; in validate_section_offset()
1640 if (secend < shdr->sh_offset || secend > info->len) in validate_section_offset()
1655 Elf_Shdr *shdr, *strhdr; in elf_validity_check() local
1742 shdr = &info->sechdrs[i]; in elf_validity_check()
[all …]

123