Home
last modified time | relevance | path

Searched refs:hdr (Results 1 – 25 of 127) sorted by relevance

123456

/toolchain/binutils/binutils-2.25/bfd/
Darchive.c467 struct ar_hdr hdr; in _bfd_generic_read_ar_hdr_mag() local
468 char *hdrp = (char *) &hdr; in _bfd_generic_read_ar_hdr_mag()
486 if (strncmp (hdr.ar_fmag, ARFMAG, 2) != 0 in _bfd_generic_read_ar_hdr_mag()
488 || strncmp (hdr.ar_fmag, mag, 2) != 0)) in _bfd_generic_read_ar_hdr_mag()
495 fmag_save = hdr.ar_fmag[0]; in _bfd_generic_read_ar_hdr_mag()
496 hdr.ar_fmag[0] = 0; in _bfd_generic_read_ar_hdr_mag()
497 scan = sscanf (hdr.ar_size, "%" BFD_VMA_FMT "u", &parsed_size); in _bfd_generic_read_ar_hdr_mag()
498 hdr.ar_fmag[0] = fmag_save; in _bfd_generic_read_ar_hdr_mag()
508 if ((hdr.ar_name[0] == '/' in _bfd_generic_read_ar_hdr_mag()
509 || (hdr.ar_name[0] == ' ' in _bfd_generic_read_ar_hdr_mag()
[all …]
Di386msdos.c46 static char hdr[EXE_PAGE_SIZE]; in msdos_write_object_contents() local
47 file_ptr outfile_size = sizeof(hdr); in msdos_write_object_contents()
64 file_ptr sec_end = (sizeof (hdr) in msdos_write_object_contents()
80 H_PUT_16 (abfd, EXE_MAGIC, &hdr[0]); in msdos_write_object_contents()
81 H_PUT_16 (abfd, EXE_PAGE_SIZE / 16, &hdr[8]); in msdos_write_object_contents()
82 H_PUT_16 (abfd, EXE_LOAD_LOW, &hdr[12]); in msdos_write_object_contents()
83 H_PUT_16 (abfd, 0x3e, &hdr[24]); in msdos_write_object_contents()
84 H_PUT_16 (abfd, 0x0001, &hdr[28]); /* XXX??? */ in msdos_write_object_contents()
85 H_PUT_16 (abfd, 0x30fb, &hdr[30]); /* XXX??? */ in msdos_write_object_contents()
86 H_PUT_16 (abfd, 0x726a, &hdr[32]); /* XXX??? */ in msdos_write_object_contents()
[all …]
Darchive64.c156 struct ar_hdr hdr; in bfd_elf64_archive_write_armap() local
169 memset (&hdr, ' ', sizeof (struct ar_hdr)); in bfd_elf64_archive_write_armap()
170 memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); in bfd_elf64_archive_write_armap()
171 if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) in bfd_elf64_archive_write_armap()
173 _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", in bfd_elf64_archive_write_armap()
176 _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0); in bfd_elf64_archive_write_armap()
177 _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0); in bfd_elf64_archive_write_armap()
178 _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0); in bfd_elf64_archive_write_armap()
179 memcpy (hdr.ar_fmag, ARFMAG, 2); in bfd_elf64_archive_write_armap()
183 if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) in bfd_elf64_archive_write_armap()
Delf.c325 Elf_Internal_Shdr *hdr; in bfd_elf_string_from_elf_section() local
333 hdr = elf_elfsections (abfd)[shindex]; in bfd_elf_string_from_elf_section()
335 if (hdr->contents == NULL in bfd_elf_string_from_elf_section()
339 if (strindex >= hdr->sh_size) in bfd_elf_string_from_elf_section()
344 abfd, strindex, (unsigned long) hdr->sh_size, in bfd_elf_string_from_elf_section()
345 (shindex == shstrndx && strindex == hdr->sh_name in bfd_elf_string_from_elf_section()
347 : bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name))); in bfd_elf_string_from_elf_section()
351 return ((char *) hdr->contents) + strindex; in bfd_elf_string_from_elf_section()
516 Elf_Internal_Shdr *hdr; in group_signature() local
525 hdr = elf_elfsections (abfd) [ghdr->sh_link]; in group_signature()
[all …]
Dcoff-rs6000.c1238 struct xcoff_ar_hdr hdr; in _bfd_xcoff_slurp_armap() local
1251 if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd) in _bfd_xcoff_slurp_armap()
1256 namlen = strtol (hdr.namlen, (char **) NULL, 10); in _bfd_xcoff_slurp_armap()
1261 sz = strtol (hdr.size, (char **) NULL, 10); in _bfd_xcoff_slurp_armap()
1293 struct xcoff_ar_hdr_big hdr; in _bfd_xcoff_slurp_armap() local
1306 if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd) in _bfd_xcoff_slurp_armap()
1311 namlen = strtol (hdr.namlen, (char **) NULL, 10); in _bfd_xcoff_slurp_armap()
1319 sz = strtol (hdr.size, (char **) NULL, 10); in _bfd_xcoff_slurp_armap()
1410 struct xcoff_ar_file_hdr hdr; in _bfd_xcoff_archive_p() local
1413 memcpy (hdr.magic, magic, SXCOFFARMAG); in _bfd_xcoff_archive_p()
[all …]
Dsrec.c455 unsigned char hdr[3]; in srec_scan() local
465 if (bfd_bread (hdr, (bfd_size_type) 3, abfd) != 3) in srec_scan()
468 if (! ISHEX (hdr[1]) || ! ISHEX (hdr[2])) in srec_scan()
470 if (! ISHEX (hdr[1])) in srec_scan()
471 c = hdr[1]; in srec_scan()
473 c = hdr[2]; in srec_scan()
478 check_sum = bytes = HEX (hdr + 1); in srec_scan()
480 if (hdr[0] == '2' || hdr[0] == '8') in srec_scan()
482 else if (hdr[0] == '3' || hdr[0] == '7') in srec_scan()
510 switch (hdr[0]) in srec_scan()
[all …]
Dppcboot.c138 ppcboot_hdr_t hdr; in ppcboot_object_p() local
164 if (bfd_bread (&hdr, (bfd_size_type) sizeof (hdr), abfd) in ppcboot_object_p()
165 != sizeof (hdr)) in ppcboot_object_p()
174 for (i = 0; i < sizeof (hdr.pc_compatibility); i++) in ppcboot_object_p()
175 if (hdr.pc_compatibility[i]) in ppcboot_object_p()
181 if (hdr.signature[0] != SIGNATURE0 || hdr.signature[1] != SIGNATURE1) in ppcboot_object_p()
187 if (hdr.partition[0].partition_end.ind != PPC_IND) in ppcboot_object_p()
207 memcpy (&tdata->header, &hdr, sizeof (ppcboot_hdr_t)); in ppcboot_object_p()
Dihex.c279 char hdr[8]; in ihex_scan() local
291 if (bfd_bread (hdr, (bfd_size_type) 8, abfd) != 8) in ihex_scan()
296 if (! ISHEX (hdr[i])) in ihex_scan()
298 ihex_bad_byte (abfd, lineno, hdr[i], error); in ihex_scan()
303 len = HEX2 (hdr); in ihex_scan()
304 addr = HEX4 (hdr + 2); in ihex_scan()
305 type = HEX2 (hdr + 6); in ihex_scan()
556 char hdr[8]; in ihex_read_section() local
568 if (bfd_bread (hdr, (bfd_size_type) 8, abfd) != 8) in ihex_read_section()
571 len = HEX2 (hdr); in ihex_read_section()
[all …]
Delfcode.h883 rela_hdr = elf_section_data (sec)->rela.hdr; in elf_write_relocs()
885 rela_hdr = elf_section_data (sec)->rel.hdr; in elf_write_relocs()
1119 Elf_Internal_Shdr *hdr; in elf_slurp_symbol_table() local
1144 hdr = &elf_tdata (abfd)->symtab_hdr; in elf_slurp_symbol_table()
1149 hdr = &elf_tdata (abfd)->dynsymtab_hdr; in elf_slurp_symbol_table()
1165 symcount = hdr->sh_size / sizeof (Elf_External_Sym); in elf_slurp_symbol_table()
1170 isymbuf = bfd_elf_get_elf_syms (abfd, hdr, symcount, 0, in elf_slurp_symbol_table()
1219 sym->symbol.name = bfd_elf_sym_name (abfd, hdr, isym, NULL); in elf_slurp_symbol_table()
1363 if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf) in elf_slurp_symbol_table()
1370 if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf) in elf_slurp_symbol_table()
[all …]
Delf32-sh64.c178 const Elf_Internal_Shdr *hdr) in sh64_elf_section_flags() argument
180 if (hdr->bfd_section == NULL) in sh64_elf_section_flags()
183 if (strcmp (hdr->bfd_section->name, SH64_CRANGES_SECTION_NAME) == 0) in sh64_elf_section_flags()
267 sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, in sh64_backend_section_from_shdr() argument
275 switch (hdr->sh_type) in sh64_backend_section_from_shdr()
293 if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) in sh64_backend_section_from_shdr()
297 && ! bfd_set_section_flags (abfd, hdr->bfd_section, in sh64_backend_section_from_shdr()
299 hdr->bfd_section) in sh64_backend_section_from_shdr()
Daoutf1.h547 struct internal_sunos_core *hdr; /* Core file header. */ member
627 abfd->tdata.sun_core_data->hdr = core; in sunos4_core_file_p()
683 return core_hdr (abfd)->hdr->c_cmdname; in sunos4_core_file_failing_command()
689 return core_hdr (abfd)->hdr->c_signo; in sunos4_core_file_failing_signal()
702 if ((core_hdr (core_bfd)->hdr)->c_len == SOLARIS_BCP_CORE_LEN) in sunos4_core_file_matches_executable_p()
705 return memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr), in sunos4_core_file_matches_executable_p()
Dcoffgen.c50 struct internal_scnhdr *hdr, in make_a_section_from_file() argument
67 && hdr->s_name[0] == '/') in make_a_section_from_file()
79 memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1); in make_a_section_from_file()
102 (bfd_size_type) sizeof (hdr->s_name) + 1 + 1); in make_a_section_from_file()
105 strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name)); in make_a_section_from_file()
106 name[sizeof (hdr->s_name)] = 0; in make_a_section_from_file()
113 return_section->vma = hdr->s_vaddr; in make_a_section_from_file()
114 return_section->lma = hdr->s_paddr; in make_a_section_from_file()
115 return_section->size = hdr->s_size; in make_a_section_from_file()
116 return_section->filepos = hdr->s_scnptr; in make_a_section_from_file()
[all …]
Delf64-ia64-vms.c813 const Elf_Internal_Shdr *hdr) in elf64_ia64_section_flags() argument
815 if (hdr->sh_flags & SHF_IA_64_SHORT) in elf64_ia64_section_flags()
825 elf64_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, in elf64_ia64_fake_sections() argument
836 hdr->sh_type = SHT_IA_64_UNWIND; in elf64_ia64_fake_sections()
837 hdr->sh_flags |= SHF_LINK_ORDER; in elf64_ia64_fake_sections()
840 hdr->sh_type = SHT_IA_64_EXT; in elf64_ia64_fake_sections()
843 hdr->sh_flags |= SHF_IA_64_SHORT; in elf64_ia64_fake_sections()
4443 Elf_Internal_Shdr *hdr, in elf64_vms_section_from_shdr() argument
4449 switch (hdr->sh_type) in elf64_vms_section_from_shdr()
4470 if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) in elf64_vms_section_from_shdr()
[all …]
Delf-attrs.c429 _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) in _bfd_elf_parse_attributes() argument
436 contents = (bfd_byte *) bfd_malloc (hdr->sh_size); in _bfd_elf_parse_attributes()
439 if (!bfd_get_section_contents (abfd, hdr->bfd_section, contents, 0, in _bfd_elf_parse_attributes()
440 hdr->sh_size)) in _bfd_elf_parse_attributes()
449 len = hdr->sh_size - 1; in _bfd_elf_parse_attributes()
Dcoffcode.h737 void * hdr, in styp_to_sec_flags() argument
742 struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; in styp_to_sec_flags()
892 void * hdr, in handle_COMDAT() argument
896 struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; in handle_COMDAT()
1159 void * hdr, in styp_to_sec_flags() argument
1164 struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; in styp_to_sec_flags()
1288 sec_flags = handle_COMDAT (abfd, sec_flags, hdr, name, section); in styp_to_sec_flags()
1824 struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr; in coff_set_alignment_hook() local
1830 if ((1 << i) >= hdr->s_align) in coff_set_alignment_hook()
1835 i = (hdr->s_flags >> 8) & 0xF ; in coff_set_alignment_hook()
[all …]
Delfxx-mips.c1443 HDRR *hdr = &debug->symbolic_header; in mips_elf_create_procedure_table() local
1468 count = hdr->ipdMax; in mips_elf_create_procedure_table()
1490 count = hdr->isymMax; in mips_elf_create_procedure_table()
1499 count = hdr->issMax; in mips_elf_create_procedure_table()
1506 count = hdr->ipdMax; in mips_elf_create_procedure_table()
6911 _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) in _bfd_mips_elf_section_processing() argument
6913 if (hdr->sh_type == SHT_MIPS_REGINFO in _bfd_mips_elf_section_processing()
6914 && hdr->sh_size > 0) in _bfd_mips_elf_section_processing()
6918 BFD_ASSERT (hdr->sh_size == sizeof (Elf32_External_RegInfo)); in _bfd_mips_elf_section_processing()
6919 BFD_ASSERT (hdr->contents == NULL); in _bfd_mips_elf_section_processing()
[all …]
Delf32-tic6x.c1932 Elf_Internal_Shdr *hdr; in elf32_tic6x_gc_mark_extra_sections() local
1934 hdr = &elf_section_data (o)->this_hdr; in elf32_tic6x_gc_mark_extra_sections()
1935 if (hdr->sh_type == SHT_C6000_UNWIND in elf32_tic6x_gc_mark_extra_sections()
1936 && hdr->sh_link in elf32_tic6x_gc_mark_extra_sections()
1937 && hdr->sh_link < elf_numsections (sub) in elf32_tic6x_gc_mark_extra_sections()
1939 && elf_shdrp[hdr->sh_link]->bfd_section->gc_mark) in elf32_tic6x_gc_mark_extra_sections()
1967 Elf_Internal_Shdr *hdr, asection *sec) in elf32_tic6x_fake_sections() argument
1975 hdr->sh_type = SHT_C6000_UNWIND; in elf32_tic6x_fake_sections()
1976 hdr->sh_flags |= SHF_LINK_ORDER; in elf32_tic6x_fake_sections()
2211 rel_hdr = elf_section_data (sec)->rel.hdr; in elf32_tic6x_rel_relocation_p()
[all …]
/toolchain/binutils/binutils-2.25/libiberty/
Dsimple-object-mach-o.c897 unsigned char *hdr; in simple_object_mach_o_write_header() local
908 hdr = &hdrbuf[0]; in simple_object_mach_o_write_header()
909 set_32 (hdr + offsetof (struct mach_o_header_32, magic), attrs->magic); in simple_object_mach_o_write_header()
910 set_32 (hdr + offsetof (struct mach_o_header_32, cputype), attrs->cputype); in simple_object_mach_o_write_header()
911 set_32 (hdr + offsetof (struct mach_o_header_32, cpusubtype), in simple_object_mach_o_write_header()
913 set_32 (hdr + offsetof (struct mach_o_header_32, filetype), MACH_O_MH_OBJECT); in simple_object_mach_o_write_header()
914 set_32 (hdr + offsetof (struct mach_o_header_32, ncmds), 1); in simple_object_mach_o_write_header()
915 set_32 (hdr + offsetof (struct mach_o_header_32, flags), attrs->flags); in simple_object_mach_o_write_header()
919 set_32 (hdr + offsetof (struct mach_o_header_32, sizeofcmds), in simple_object_mach_o_write_header()
925 set_32 (hdr + offsetof (struct mach_o_header_64, sizeofcmds), in simple_object_mach_o_write_header()
[all …]
Dsimple-object-xcoff.c580 unsigned char *hdr; in simple_object_xcoff_write_filehdr() local
585 hdr = &hdrbuf[0]; in simple_object_xcoff_write_filehdr()
591 memset (hdr, 0, sizeof (struct external_filehdr)); in simple_object_xcoff_write_filehdr()
593 set_16 (hdr + offsetof (struct external_filehdr, f_magic), attrs->magic); in simple_object_xcoff_write_filehdr()
594 set_16 (hdr + offsetof (struct external_filehdr, f_nscns), nscns); in simple_object_xcoff_write_filehdr()
598 set_64 (hdr + offsetof (struct external_filehdr, u.xcoff64.f_symptr), in simple_object_xcoff_write_filehdr()
600 set_32 (hdr + offsetof (struct external_filehdr, u.xcoff64.f_nsyms), in simple_object_xcoff_write_filehdr()
603 set_16 (hdr + offsetof (struct external_filehdr, u.xcoff64.f_flags), in simple_object_xcoff_write_filehdr()
608 set_32 (hdr + offsetof (struct external_filehdr, u.xcoff64.f_symptr), in simple_object_xcoff_write_filehdr()
610 set_32 (hdr + offsetof (struct external_filehdr, u.xcoff64.f_nsyms), in simple_object_xcoff_write_filehdr()
[all …]
Dsimple-object-coff.c512 unsigned char *hdr; in simple_object_coff_write_filehdr() local
516 hdr = &hdrbuf[0]; in simple_object_coff_write_filehdr()
525 memset (hdr, 0, sizeof (struct external_filehdr)); in simple_object_coff_write_filehdr()
527 set_16 (hdr + offsetof (struct external_filehdr, f_magic), attrs->magic); in simple_object_coff_write_filehdr()
528 set_16 (hdr + offsetof (struct external_filehdr, f_nscns), nscns); in simple_object_coff_write_filehdr()
530 set_32 (hdr + offsetof (struct external_filehdr, f_symptr), symtab_offset); in simple_object_coff_write_filehdr()
531 set_32 (hdr + offsetof (struct external_filehdr, f_nsyms), nsyms); in simple_object_coff_write_filehdr()
533 set_16 (hdr + offsetof (struct external_filehdr, f_flags), attrs->flags); in simple_object_coff_write_filehdr()
553 unsigned char *hdr; in simple_object_coff_write_scnhdr() local
562 hdr = &hdrbuf[0]; in simple_object_coff_write_scnhdr()
[all …]
/toolchain/binutils/binutils-2.25/binutils/
Dod-xcoff.c1679 dump_dumpx_core (bfd *abfd, struct external_core_dumpx *hdr) in dump_dumpx_core() argument
1683 printf (" signal: %u\n", bfd_h_get_8 (abfd, hdr->c_signo)); in dump_dumpx_core()
1684 printf (" flags: 0x%02x\n", bfd_h_get_8 (abfd, hdr->c_flag)); in dump_dumpx_core()
1686 (unsigned) bfd_h_get_16 (abfd, hdr->c_entries)); in dump_dumpx_core()
1689 bfd_h_get_64 (abfd, hdr->c_fdsinfox)); in dump_dumpx_core()
1692 bfd_h_get_64 (abfd, hdr->c_loader), in dump_dumpx_core()
1693 bfd_h_get_64 (abfd, hdr->c_lsize)); in dump_dumpx_core()
1695 bfd_h_get_64 (abfd, hdr->c_thr), in dump_dumpx_core()
1696 (unsigned) bfd_h_get_32 (abfd, hdr->c_n_thr)); in dump_dumpx_core()
1699 bfd_h_get_64 (abfd, hdr->c_segregion), in dump_dumpx_core()
[all …]
/toolchain/binutils/binutils-2.25/gas/config/
Dobj-ecoff.c143 HDRR *hdr; in ecoff_frob_file() local
149 hdr = &ecoff_data (stdoutput)->debug_info.symbolic_header; in ecoff_frob_file()
150 ecoff_build_debug (hdr, &buf, debug_swap); in ecoff_frob_file()
155 if (hdr->count == 0) \ in ecoff_frob_file()
160 set += hdr->count * size; \ in ecoff_frob_file()
/toolchain/binutils/binutils-2.25/gold/
Darchive.cc334 const Archive_header* hdr = reinterpret_cast<const Archive_header*>(p); in read_header() local
335 return this->interpret_header(hdr, off, pname, nested_off); in read_header()
343 Archive::interpret_header(const Archive_header* hdr, off_t off, in interpret_header() argument
346 if (memcmp(hdr->ar_fmag, arfmag, sizeof arfmag) != 0) in interpret_header()
353 const int size_string_size = sizeof hdr->ar_size; in interpret_header()
355 memcpy(size_string, hdr->ar_size, size_string_size); in interpret_header()
373 if (hdr->ar_name[0] != '/') in interpret_header()
375 const char* name_end = strchr(hdr->ar_name, '/'); in interpret_header()
377 || name_end - hdr->ar_name >= static_cast<int>(sizeof hdr->ar_name)) in interpret_header()
383 pname->assign(hdr->ar_name, name_end - hdr->ar_name); in interpret_header()
[all …]
/toolchain/binutils/binutils-2.25/ld/testsuite/ld-elf/
Deh-frame-hdr.d1 #source: eh-frame-hdr.s
2 #ld: -e _start --eh-frame-hdr
/toolchain/binutils/binutils-2.25/gas/
Decoff.c4623 ecoff_build_debug (HDRR *hdr, in ecoff_build_debug() argument
4711 hdr->cbLineOffset = offset; in ecoff_build_debug()
4713 &hdr->ilineMax); in ecoff_build_debug()
4714 hdr->cbLine = offset - hdr->cbLineOffset; in ecoff_build_debug()
4717 hdr->idnMax = 0; in ecoff_build_debug()
4718 hdr->cbDnOffset = 0; in ecoff_build_debug()
4723 hdr->ipdMax = proc_cnt; in ecoff_build_debug()
4724 hdr->cbPdOffset = offset; in ecoff_build_debug()
4731 hdr->cbSymOffset = offset; in ecoff_build_debug()
4733 hdr->isymMax = (offset - hdr->cbSymOffset) / backend->external_sym_size; in ecoff_build_debug()
[all …]

123456