Lines Matching defs:shdr
32 Elf_Shdr shdr;
249 name = sec_strtab + secs[shndx].shdr.sh_name;
283 if (sec->shdr.sh_type != SHT_SYMTAB)
286 nsyms = sec->shdr.sh_size/sizeof(Elf_Sym);
389 Elf_Shdr shdr;
394 if (fread(&shdr, sizeof(shdr), 1, fp) != 1)
398 shnum = elf_xword_to_cpu(shdr.sh_size);
401 shstrndx = elf_word_to_cpu(shdr.sh_link);
411 Elf_Shdr shdr;
424 if (fread(&shdr, sizeof(shdr), 1, fp) != 1)
427 sec->shdr.sh_name = elf_word_to_cpu(shdr.sh_name);
428 sec->shdr.sh_type = elf_word_to_cpu(shdr.sh_type);
429 sec->shdr.sh_flags = elf_xword_to_cpu(shdr.sh_flags);
430 sec->shdr.sh_addr = elf_addr_to_cpu(shdr.sh_addr);
431 sec->shdr.sh_offset = elf_off_to_cpu(shdr.sh_offset);
432 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size);
433 sec->shdr.sh_link = elf_word_to_cpu(shdr.sh_link);
434 sec->shdr.sh_info = elf_word_to_cpu(shdr.sh_info);
435 sec->shdr.sh_addralign = elf_xword_to_cpu(shdr.sh_addralign);
436 sec->shdr.sh_entsize = elf_xword_to_cpu(shdr.sh_entsize);
437 if (sec->shdr.sh_link < shnum)
438 sec->link = &secs[sec->shdr.sh_link];
448 if (sec->shdr.sh_type != SHT_STRTAB) {
451 sec->strtab = malloc(sec->shdr.sh_size);
454 sec->shdr.sh_size);
456 if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0) {
458 sec->shdr.sh_offset, strerror(errno));
460 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp)
461 != sec->shdr.sh_size) {
473 if (sec->shdr.sh_type != SHT_SYMTAB) {
476 sec->symtab = malloc(sec->shdr.sh_size);
479 sec->shdr.sh_size);
481 if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0) {
483 sec->shdr.sh_offset, strerror(errno));
485 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp)
486 != sec->shdr.sh_size) {
490 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Sym); j++) {
506 if (sec->shdr.sh_type != SHT_REL_TYPE) {
509 sec->reltab = malloc(sec->shdr.sh_size);
512 sec->shdr.sh_size);
514 if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0) {
516 sec->shdr.sh_offset, strerror(errno));
518 if (fread(sec->reltab, 1, sec->shdr.sh_size, fp)
519 != sec->shdr.sh_size) {
523 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
552 if (sec->shdr.sh_type != SHT_SYMTAB) {
556 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Sym); j++) {
591 if (sec->shdr.sh_type != SHT_REL_TYPE) {
595 sec_applies = &secs[sec->shdr.sh_info];
596 if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
601 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
676 if (sec->shdr.sh_type != SHT_REL_TYPE) {
680 sec_applies = &secs[sec->shdr.sh_info];
681 if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) {
686 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
730 if (secs[i].shdr.sh_addr != 0) /* non SMP kernel */
782 if (sec->shdr.sh_info == per_cpu_shndx)
1092 sec_name(sec->shdr.sh_info),