Lines Matching refs:header
310 bfd_pef_loader_header *header)
314 header->main_section = bfd_getb32 (buf);
315 header->main_offset = bfd_getb32 (buf + 4);
316 header->init_section = bfd_getb32 (buf + 8);
317 header->init_offset = bfd_getb32 (buf + 12);
318 header->term_section = bfd_getb32 (buf + 16);
319 header->term_offset = bfd_getb32 (buf + 20);
320 header->imported_library_count = bfd_getb32 (buf + 24);
321 header->total_imported_symbol_count = bfd_getb32 (buf + 28);
322 header->reloc_section_count = bfd_getb32 (buf + 32);
323 header->reloc_instr_offset = bfd_getb32 (buf + 36);
324 header->loader_strings_offset = bfd_getb32 (buf + 40);
325 header->export_hash_offset = bfd_getb32 (buf + 44);
326 header->export_hash_table_power = bfd_getb32 (buf + 48);
327 header->exported_symbol_count = bfd_getb32 (buf + 52);
336 bfd_pef_imported_library *header)
340 header->name_offset = bfd_getb32 (buf);
341 header->old_implementation_version = bfd_getb32 (buf + 4);
342 header->current_version = bfd_getb32 (buf + 8);
343 header->imported_symbol_count = bfd_getb32 (buf + 12);
344 header->first_imported_symbol = bfd_getb32 (buf + 16);
345 header->options = buf[20];
346 header->reserved_a = buf[21];
347 header->reserved_b = bfd_getb16 (buf + 22);
398 bfd_pef_loader_header *header,
401 fprintf (file, "main_section: %ld\n", header->main_section);
402 fprintf (file, "main_offset: %lu\n", header->main_offset);
403 fprintf (file, "init_section: %ld\n", header->init_section);
404 fprintf (file, "init_offset: %lu\n", header->init_offset);
405 fprintf (file, "term_section: %ld\n", header->term_section);
406 fprintf (file, "term_offset: %lu\n", header->term_offset);
408 header->imported_library_count);
410 header->total_imported_symbol_count);
411 fprintf (file, "reloc_section_count: %lu\n", header->reloc_section_count);
412 fprintf (file, "reloc_instr_offset: %lu\n", header->reloc_instr_offset);
414 header->loader_strings_offset);
415 fprintf (file, "export_hash_offset: %lu\n", header->export_hash_offset);
417 header->export_hash_table_power);
419 header->exported_symbol_count);
425 bfd_pef_loader_header header;
440 || bfd_pef_parse_loader_header (abfd, loaderbuf, 56, &header) < 0)
446 bfd_pef_print_loader_header (abfd, &header, file);
453 bfd_pef_loader_header header;
474 ret = bfd_pef_parse_loader_header (abfd, loaderbuf, 56, &header);
478 if (header.main_section < 0)
482 if ((section->index + 1) == header.main_section)
488 abfd->start_address = section->vma + header.main_offset;
502 bfd_pef_scan (abfd, header, mdata)
504 bfd_pef_header *header;
511 mdata->header = *header;
513 bfd_pef_convert_architecture (header->architecture, &cputype, &cpusubtype);
517 header->architecture);
522 mdata->header = *header;
527 if (header->section_count != 0)
529 mdata->sections = bfd_alloc (abfd, header->section_count * sizeof (bfd_pef_section));
534 for (i = 0; i < header->section_count; i++)
552 bfd_pef_read_header (bfd *abfd, bfd_pef_header *header)
561 header->tag1 = bfd_getb32 (buf);
562 header->tag2 = bfd_getb32 (buf + 4);
563 header->architecture = bfd_getb32 (buf + 8);
564 header->format_version = bfd_getb32 (buf + 12);
565 header->timestamp = bfd_getb32 (buf + 16);
566 header->old_definition_version = bfd_getb32 (buf + 20);
567 header->old_implementation_version = bfd_getb32 (buf + 24);
568 header->current_version = bfd_getb32 (buf + 28);
569 header->section_count = bfd_getb32 (buf + 32) + 1;
570 header->instantiated_section_count = bfd_getb32 (buf + 34);
571 header->reserved = bfd_getb32 (buf + 36);
580 bfd_pef_header header;
583 if (bfd_pef_read_header (abfd, &header) != 0)
586 if (header.tag1 != BFD_PEF_TAG1 || header.tag2 != BFD_PEF_TAG2)
594 if (bfd_pef_scan (abfd, &header,
734 bfd_pef_loader_header header;
744 ret = bfd_pef_parse_loader_header (abfd, loaderbuf, 56, &header);
749 (header.imported_library_count * sizeof (bfd_pef_imported_library));
751 (header.total_imported_symbol_count * sizeof (bfd_pef_imported_symbol));
753 if (loaderlen < (56 + (header.imported_library_count * 24)))
755 for (i = 0; i < header.imported_library_count; i++)
763 if (loaderlen < (56 + (header.imported_library_count * 24)
764 + (header.total_imported_symbol_count * 4)))
766 for (i = 0; i < header.total_imported_symbol_count; i++)
770 loaderbuf + 56 + (header.imported_library_count * 24) + (i * 4),
809 if (index >= header.total_imported_symbol_count)
819 if (loaderlen < (header.loader_strings_offset + imports[index].name))
822 max = loaderlen - (header.loader_strings_offset + imports[index].name);
824 symname += header.loader_strings_offset + imports[index].name;
1068 bfd_pef_xlib_read_header (bfd *abfd, bfd_pef_xlib_header *header)
1077 header->tag1 = bfd_getb32 (buf);
1078 header->tag2 = bfd_getb32 (buf + 4);
1079 header->current_format = bfd_getb32 (buf + 8);
1080 header->container_strings_offset = bfd_getb32 (buf + 12);
1081 header->export_hash_offset = bfd_getb32 (buf + 16);
1082 header->export_key_offset = bfd_getb32 (buf + 20);
1083 header->export_symbol_offset = bfd_getb32 (buf + 24);
1084 header->export_names_offset = bfd_getb32 (buf + 28);
1085 header->export_hash_table_power = bfd_getb32 (buf + 32);
1086 header->exported_symbol_count = bfd_getb32 (buf + 36);
1087 header->frag_name_offset = bfd_getb32 (buf + 40);
1088 header->frag_name_length = bfd_getb32 (buf + 44);
1089 header->dylib_path_offset = bfd_getb32 (buf + 48);
1090 header->dylib_path_length = bfd_getb32 (buf + 52);
1091 header->cpu_family = bfd_getb32 (buf + 56);
1092 header->cpu_model = bfd_getb32 (buf + 60);
1093 header->date_time_stamp = bfd_getb32 (buf + 64);
1094 header->current_version = bfd_getb32 (buf + 68);
1095 header->old_definition_version = bfd_getb32 (buf + 72);
1096 header->old_implementation_version = bfd_getb32 (buf + 76);
1102 bfd_pef_xlib_scan (bfd *abfd, bfd_pef_xlib_header *header)
1110 mdata->header = *header;
1124 bfd_pef_xlib_header header;
1126 if (bfd_pef_xlib_read_header (abfd, &header) != 0)
1132 if ((header.tag1 != BFD_PEF_XLIB_TAG1)
1133 || ((header.tag2 != BFD_PEF_VLIB_TAG2)
1134 && (header.tag2 != BFD_PEF_BLIB_TAG2)))
1146 if (bfd_pef_xlib_scan (abfd, &header) != 0)