/linux-6.6.21/tools/perf/util/ |
D | genelf.c | 165 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 …]
|
D | genelf_debug.c | 499 Elf_Shdr *shdr; in jit_add_debug_info() local 532 shdr = elf_getshdr(scn); in jit_add_debug_info() 533 if (!shdr) { in jit_add_debug_info() 538 shdr->sh_name = 52; /* .debug_line */ in jit_add_debug_info() 539 shdr->sh_type = SHT_PROGBITS; in jit_add_debug_info() 540 shdr->sh_addr = 0; /* must be zero or == sh_offset -> dynamic object */ in jit_add_debug_info() 541 shdr->sh_flags = 0; in jit_add_debug_info() 542 shdr->sh_entsize = 0; in jit_add_debug_info() 566 shdr = elf_getshdr(scn); in jit_add_debug_info() 567 if (!shdr) { in jit_add_debug_info() [all …]
|
D | symbol-elf.c | 156 static inline const char *elf_sec__name(const GElf_Shdr *shdr, in elf_sec__name() argument 159 return secstrs->d_buf + shdr->sh_name; in elf_sec__name() 162 static inline int elf_sec__is_text(const GElf_Shdr *shdr, in elf_sec__is_text() argument 165 return strstr(elf_sec__name(shdr, secstrs), "text") != NULL; in elf_sec__is_text() 168 static inline bool elf_sec__is_data(const GElf_Shdr *shdr, in elf_sec__is_data() argument 171 return strstr(elf_sec__name(shdr, secstrs), "data") != NULL; in elf_sec__is_data() 174 static bool elf_sec__filter(GElf_Shdr *shdr, Elf_Data *secstrs) in elf_sec__filter() argument 176 return elf_sec__is_text(shdr, secstrs) || in elf_sec__filter() 177 elf_sec__is_data(shdr, secstrs); in elf_sec__filter() 183 GElf_Shdr shdr; in elf_addr_to_index() local [all …]
|
/linux-6.6.21/arch/mips/boot/tools/ |
D | relocs.c | 25 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-6.6.21/drivers/media/platform/qcom/venus/ |
D | hfi_cmds.c | 168 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) + in pkt_session_set_buffers() 212 pkt->shdr.hdr.size = struct_size(pkt, buffer_info, in pkt_session_set_buffers() [all …]
|
D | hfi_msgs.h | 49 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 …]
|
D | hfi_cmds.h | 94 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-6.6.21/arch/x86/tools/ |
D | relocs.c | 39 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-6.6.21/arch/mips/vdso/ |
D | genvdso.h | 11 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-6.6.21/arch/riscv/kernel/ |
D | module-sections.c | 23 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-6.6.21/fs/smb/client/ |
D | smb2misc.c | 22 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 …]
|
D | smb2transport.c | 236 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; in smb2_calc_signature() local 241 ses = smb2_find_smb_ses(server, le64_to_cpu(shdr->SessionId)); in smb2_calc_signature() 248 memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE); in smb2_calc_signature() 299 memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE); in smb2_calc_signature() 566 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; in smb3_calc_signature() local 571 rc = smb2_get_sign_key(le64_to_cpu(shdr->SessionId), server, key); in smb3_calc_signature() 586 memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE); in smb3_calc_signature() 627 memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE); in smb3_calc_signature() 640 struct smb2_hdr *shdr; in smb2_sign_rqst() local 645 shdr = (struct smb2_hdr *)rqst->rq_iov[0].iov_base; in smb2_sign_rqst() [all …]
|
/linux-6.6.21/tools/lib/bpf/ |
D | linker.c | 42 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-6.6.21/drivers/remoteproc/ |
D | remoteproc_elf_loader.c | 250 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 …]
|
D | remoteproc_coredump.c | 348 void *shdr; in rproc_coredump_using_sections() local 414 shdr = data + elf_hdr_get_e_shoff(class, ehdr); in rproc_coredump_using_sections() 415 memset(shdr, 0, elf_size_of_shdr(class)); in rproc_coredump_using_sections() 416 shdr += elf_size_of_shdr(class); in rproc_coredump_using_sections() 424 memset(shdr, 0, elf_size_of_shdr(class)); in rproc_coredump_using_sections() 425 elf_shdr_set_sh_type(class, shdr, SHT_STRTAB); in rproc_coredump_using_sections() 426 elf_shdr_set_sh_offset(class, shdr, offset); in rproc_coredump_using_sections() 427 elf_shdr_set_sh_size(class, shdr, strtbl_size); in rproc_coredump_using_sections() 428 elf_shdr_set_sh_entsize(class, shdr, 0); in rproc_coredump_using_sections() 429 elf_shdr_set_sh_flags(class, shdr, 0); in rproc_coredump_using_sections() [all …]
|
D | remoteproc_elf_helpers.h | 79 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 …]
|
D | pru_rproc.c | 872 struct elf32_shdr *shdr, *name_table_shdr; in pru_rproc_find_interrupt_map() local 881 shdr = (struct elf32_shdr *)(elf_data + ehdr->e_shoff); in pru_rproc_find_interrupt_map() 883 name_table_shdr = shdr + shstrndx; in pru_rproc_find_interrupt_map() 887 for (i = 0; i < shnum; i++, shdr++) { in pru_rproc_find_interrupt_map() 888 u32 size = shdr->sh_size; in pru_rproc_find_interrupt_map() 889 u32 offset = shdr->sh_offset; in pru_rproc_find_interrupt_map() 890 u32 name = shdr->sh_name; in pru_rproc_find_interrupt_map() 907 return shdr; in pru_rproc_find_interrupt_map() 930 const void *shdr; in pru_rproc_parse_fw() local 943 shdr = pru_rproc_find_interrupt_map(dev, fw); in pru_rproc_parse_fw() [all …]
|
/linux-6.6.21/arch/powerpc/boot/ |
D | hack-coff.c | 35 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-6.6.21/arch/arm64/kvm/hyp/nvhe/ |
D | gen-hyprel.c | 205 #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-6.6.21/net/core/ |
D | selftests.c | 60 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-6.6.21/arch/riscv/include/asm/ |
D | module.h | 16 Elf_Shdr *shdr; member 39 struct got_entry *got = (struct got_entry *)(sec->shdr->sh_addr); in get_got_entry() 92 struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr; in get_got_plt_idx() 105 struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr; in get_plt_entry()
|
/linux-6.6.21/kernel/module/ |
D | main.c | 187 Elf_Shdr *shdr = &info->sechdrs[i]; in find_sec() local 189 if ((shdr->sh_flags & SHF_ALLOC) in find_sec() 190 && strcmp(info->secstrings + shdr->sh_name, name) == 0) in find_sec() 222 Elf_Shdr *shdr = &info->sechdrs[i]; in find_any_sec() local 223 if (strcmp(info->secstrings + shdr->sh_name, name) == 0) in find_any_sec() 1630 static int validate_section_offset(struct load_info *info, Elf_Shdr *shdr) in validate_section_offset() argument 1642 secend = shdr->sh_offset + shdr->sh_size; in validate_section_offset() 1643 if (secend < shdr->sh_offset || secend > info->len) in validate_section_offset() 1672 Elf_Shdr *shdr, *strhdr; in elf_validity_cache_copy() local 1767 shdr = &info->sechdrs[i]; in elf_validity_cache_copy() [all …]
|
/linux-6.6.21/drivers/bluetooth/ |
D | btmtkuart.c | 297 struct mtk_stp_hdr *shdr; in mtk_stp_split() local 313 shdr = (struct mtk_stp_hdr *)&bdev->stp_pad[2]; in mtk_stp_split() 314 bdev->stp_dlen = be16_to_cpu(shdr->dlen) & 0x0fff; in mtk_stp_split() 317 if (shdr->prefix != 0x80 || bdev->stp_dlen > 2048) { in mtk_stp_split() 319 shdr->prefix, bdev->stp_dlen); in mtk_stp_split() 727 struct mtk_stp_hdr *shdr; in btmtkuart_send_frame() local 734 if (unlikely(skb_headroom(skb) < sizeof(*shdr)) || in btmtkuart_send_frame() 736 err = pskb_expand_head(skb, sizeof(*shdr), MTK_STP_TLR_SIZE, in btmtkuart_send_frame() 744 shdr = skb_push(skb, sizeof(*shdr)); in btmtkuart_send_frame() 745 shdr->prefix = 0x80; in btmtkuart_send_frame() [all …]
|
/linux-6.6.21/scripts/ |
D | sorttable.h | 266 Elf_Shdr *s, *shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); in do_sort() local 299 shstrndx = r(&shdr[0].sh_link); in do_sort() 300 secstrings = (const char *)ehdr + _r(&shdr[shstrndx].sh_offset); in do_sort() 304 shnum = _r(&shdr[0].sh_size); in do_sort() 306 for (i = 0, s = shdr; s < shdr + shnum; i++, s++) { in do_sort() 448 sort_needed_sec = &shdr[get_secindex(r2(&sym->st_shndx), in do_sort()
|
/linux-6.6.21/drivers/cpufreq/ |
D | pmac64-cpufreq.c | 384 const struct smu_sdbp_header *shdr; in g5_neo2_cpufreq_init() local 387 shdr = smu_get_sdb_partition(SMU_SDB_FVT_ID, NULL); in g5_neo2_cpufreq_init() 388 if (!shdr) in g5_neo2_cpufreq_init() 390 g5_fvt_table = (struct smu_sdbp_fvt *)&shdr[1]; in g5_neo2_cpufreq_init() 391 ssize = (shdr->len * sizeof(u32)) - sizeof(*shdr); in g5_neo2_cpufreq_init()
|