Lines Matching refs:command
792 bfd_mach_o_dylib_command *idy = &icmd->command.dylib; in bfd_mach_o_bfd_copy_private_header_data()
793 bfd_mach_o_dylib_command *ody = &ocmd->command.dylib; in bfd_mach_o_bfd_copy_private_header_data()
805 bfd_mach_o_dylinker_command *idy = &icmd->command.dylinker; in bfd_mach_o_bfd_copy_private_header_data()
806 bfd_mach_o_dylinker_command *ody = &ocmd->command.dylinker; in bfd_mach_o_bfd_copy_private_header_data()
815 bfd_mach_o_dyld_info_command *idy = &icmd->command.dyld_info; in bfd_mach_o_bfd_copy_private_header_data()
816 bfd_mach_o_dyld_info_command *ody = &ocmd->command.dyld_info; in bfd_mach_o_bfd_copy_private_header_data()
1269 bfd_mach_o_write_thread (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_thread() argument
1271 bfd_mach_o_thread_command *cmd = &command->command.thread; in bfd_mach_o_write_thread()
1276 BFD_ASSERT ((command->type == BFD_MACH_O_LC_THREAD) in bfd_mach_o_write_thread()
1277 || (command->type == BFD_MACH_O_LC_UNIXTHREAD)); in bfd_mach_o_write_thread()
1284 == command->offset + offset + BFD_MACH_O_LC_SIZE); in bfd_mach_o_write_thread()
1289 if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 in bfd_mach_o_write_thread()
1300 bfd_mach_o_write_dylinker (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_dylinker() argument
1302 bfd_mach_o_dylinker_command *cmd = &command->command.dylinker; in bfd_mach_o_write_dylinker()
1308 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_dylinker()
1323 bfd_mach_o_write_dylib (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_dylib() argument
1325 bfd_mach_o_dylib_command *cmd = &command->command.dylib; in bfd_mach_o_write_dylib()
1334 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_dylib()
1349 bfd_mach_o_write_main (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_main() argument
1351 bfd_mach_o_main_command *cmd = &command->command.main; in bfd_mach_o_write_main()
1357 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_main()
1365 bfd_mach_o_write_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_dyld_info() argument
1367 bfd_mach_o_dyld_info_command *cmd = &command->command.dyld_info; in bfd_mach_o_write_dyld_info()
1381 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_dyld_info()
1930 bfd_mach_o_write_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_segment_32() argument
1933 bfd_mach_o_segment_command *seg = &command->command.segment; in bfd_mach_o_write_segment_32()
1936 BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT); in bfd_mach_o_write_segment_32()
1952 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_segment_32()
1964 bfd_mach_o_write_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_segment_64() argument
1967 bfd_mach_o_segment_command *seg = &command->command.segment; in bfd_mach_o_write_segment_64()
1970 BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64); in bfd_mach_o_write_segment_64()
1986 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_segment_64()
2094 bfd_mach_o_write_symtab (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_symtab() argument
2096 bfd_mach_o_symtab_command *sym = &command->command.symtab; in bfd_mach_o_write_symtab()
2099 BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB); in bfd_mach_o_write_symtab()
2107 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 in bfd_mach_o_write_symtab()
2259 bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_write_dysymtab() argument
2261 bfd_mach_o_dysymtab_command *cmd = &command->command.dysymtab; in bfd_mach_o_write_dysymtab()
2263 BFD_ASSERT (command->type == BFD_MACH_O_LC_DYSYMTAB); in bfd_mach_o_write_dysymtab()
2404 if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0) in bfd_mach_o_write_dysymtab()
2663 if (strcmp (cmd->command.segment.segname, "__LINKEDIT") == 0) in bfd_mach_o_write_contents()
2664 linkedit = &cmd->command.segment; in bfd_mach_o_write_contents()
2667 symtab = &cmd->command.symtab; in bfd_mach_o_write_contents()
2670 dysymtab = &cmd->command.dysymtab; in bfd_mach_o_write_contents()
2674 bfd_mach_o_dyld_info_command *di = &cmd->command.dyld_info; in bfd_mach_o_write_contents()
3088 + BFD_MACH_O_SECTION_64_SIZE * cmd->command.segment.nsects; in bfd_mach_o_layout_commands()
3092 + BFD_MACH_O_SECTION_SIZE * cmd->command.segment.nsects; in bfd_mach_o_layout_commands()
3105 cmd->command.dylib.name_offset = cmd->len; in bfd_mach_o_layout_commands()
3106 cmd->len += strlen (cmd->command.dylib.name_str); in bfd_mach_o_layout_commands()
3112 cmd->command.dylinker.name_offset = cmd->len; in bfd_mach_o_layout_commands()
3113 cmd->len += strlen (cmd->command.dylinker.name_str); in bfd_mach_o_layout_commands()
3149 bfd_mach_o_segment_command *seg = &cmd->command.segment; in bfd_mach_o_init_segment()
3351 cmd->command.main.entryoff = 0; in bfd_mach_o_build_commands()
3352 cmd->command.main.stacksize = 0; in bfd_mach_o_build_commands()
3365 (abfd, &commands[i].command.segment)) in bfd_mach_o_build_commands()
3375 bfd_mach_o_segment_command *seg = &commands[i].command.segment; in bfd_mach_o_build_commands()
3385 commands[0].command.segment.vmsize = in bfd_mach_o_build_commands()
3386 commands[1].command.segment.vmaddr; in bfd_mach_o_build_commands()
3389 commands[nbr_segcmd - 1].command.segment.vmaddr = maxvma; in bfd_mach_o_build_commands()
3390 commands[nbr_segcmd - 1].command.segment.fileoff = mdata->filelen; in bfd_mach_o_build_commands()
3394 commands[main_idx].command.main.entryoff = in bfd_mach_o_build_commands()
3395 bfd_get_start_address (abfd) - commands[1].command.segment.vmaddr; in bfd_mach_o_build_commands()
4035 bfd_mach_o_read_dylinker (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_dylinker() argument
4037 bfd_mach_o_dylinker_command *cmd = &command->command.dylinker; in bfd_mach_o_read_dylinker()
4042 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_dylinker()
4048 if (nameoff > command->len) in bfd_mach_o_read_dylinker()
4052 namelen = command->len - nameoff; in bfd_mach_o_read_dylinker()
4053 nameoff += command->offset; in bfd_mach_o_read_dylinker()
4060 bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_dylib() argument
4063 bfd_mach_o_dylib_command *cmd = &command->command.dylib; in bfd_mach_o_read_dylib()
4069 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_dylib()
4071 switch (command->type) in bfd_mach_o_read_dylib()
4089 if (nameoff > command->len) in bfd_mach_o_read_dylib()
4095 cmd->name_offset = command->offset + nameoff; in bfd_mach_o_read_dylib()
4096 namelen = command->len - nameoff; in bfd_mach_o_read_dylib()
4104 bfd_mach_o_load_command *command) in bfd_mach_o_read_prebound_dylib() argument
4106 bfd_mach_o_prebound_dylib_command *cmd = &command->command.prebound_dylib; in bfd_mach_o_read_prebound_dylib()
4113 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_prebound_dylib()
4120 if (nameoff > command->len || modoff > command->len) in bfd_mach_o_read_prebound_dylib()
4123 str_len = command->len - sizeof (raw); in bfd_mach_o_read_prebound_dylib()
4128 cmd->name_offset = command->offset + nameoff; in bfd_mach_o_read_prebound_dylib()
4130 cmd->linked_modules_offset = command->offset + modoff; in bfd_mach_o_read_prebound_dylib()
4139 bfd_mach_o_load_command *command) in bfd_mach_o_read_prebind_cksum() argument
4141 bfd_mach_o_prebind_cksum_command *cmd = &command->command.prebind_cksum; in bfd_mach_o_read_prebind_cksum()
4144 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_prebind_cksum()
4155 bfd_mach_o_load_command *command) in bfd_mach_o_read_twolevel_hints() argument
4157 bfd_mach_o_twolevel_hints_command *cmd = &command->command.twolevel_hints; in bfd_mach_o_read_twolevel_hints()
4160 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_twolevel_hints()
4171 bfd_mach_o_read_fvmlib (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_fvmlib() argument
4173 bfd_mach_o_fvmlib_command *fvm = &command->command.fvmlib; in bfd_mach_o_read_fvmlib()
4178 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_fvmlib()
4184 if (nameoff > command->len) in bfd_mach_o_read_fvmlib()
4189 fvm->name_offset = command->offset + nameoff; in bfd_mach_o_read_fvmlib()
4190 namelen = command->len - nameoff; in bfd_mach_o_read_fvmlib()
4197 bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_thread() argument
4200 bfd_mach_o_thread_command *cmd = &command->command.thread; in bfd_mach_o_read_thread()
4207 BFD_ASSERT ((command->type == BFD_MACH_O_LC_THREAD) in bfd_mach_o_read_thread()
4208 || (command->type == BFD_MACH_O_LC_UNIXTHREAD)); in bfd_mach_o_read_thread()
4213 while (offset + sizeof (raw) <= command->len) in bfd_mach_o_read_thread()
4217 if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 in bfd_mach_o_read_thread()
4223 || command->len - (offset + sizeof (raw)) < count * 4) in bfd_mach_o_read_thread()
4228 if (nflavours == 0 || offset != command->len) in bfd_mach_o_read_thread()
4244 while (offset != command->len) in bfd_mach_o_read_thread()
4246 if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 in bfd_mach_o_read_thread()
4251 cmd->flavours[nflavours].offset = command->offset + offset + sizeof (raw); in bfd_mach_o_read_thread()
4311 bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, in bfd_mach_o_read_dysymtab() argument
4314 bfd_mach_o_dysymtab_command *cmd = &command->command.dysymtab; in bfd_mach_o_read_dysymtab()
4317 BFD_ASSERT (command->type == BFD_MACH_O_LC_DYSYMTAB); in bfd_mach_o_read_dysymtab()
4322 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_dysymtab()
4539 bfd_mach_o_read_symtab (bfd *abfd, bfd_mach_o_load_command *command, in bfd_mach_o_read_symtab() argument
4542 bfd_mach_o_symtab_command *symtab = &command->command.symtab; in bfd_mach_o_read_symtab()
4546 BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB); in bfd_mach_o_read_symtab()
4548 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_symtab()
4579 bfd_mach_o_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_uuid() argument
4581 bfd_mach_o_uuid_command *cmd = &command->command.uuid; in bfd_mach_o_read_uuid()
4583 BFD_ASSERT (command->type == BFD_MACH_O_LC_UUID); in bfd_mach_o_read_uuid()
4585 if (command->len < 16 + 8) in bfd_mach_o_read_uuid()
4594 bfd_mach_o_read_linkedit (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_linkedit() argument
4596 bfd_mach_o_linkedit_command *cmd = &command->command.linkedit; in bfd_mach_o_read_linkedit()
4599 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_linkedit()
4610 bfd_mach_o_read_str (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_str() argument
4612 bfd_mach_o_str_command *cmd = &command->command.str; in bfd_mach_o_read_str()
4616 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_str()
4622 if (off > command->len) in bfd_mach_o_read_str()
4625 cmd->stroff = command->offset + off; in bfd_mach_o_read_str()
4626 cmd->str_len = command->len - off; in bfd_mach_o_read_str()
4689 bfd_mach_o_read_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_dyld_info() argument
4691 bfd_mach_o_dyld_info_command *cmd = &command->command.dyld_info; in bfd_mach_o_read_dyld_info()
4694 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_dyld_info()
4718 bfd_mach_o_read_version_min (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_version_min() argument
4720 bfd_mach_o_version_min_command *cmd = &command->command.version_min; in bfd_mach_o_read_version_min()
4723 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_version_min()
4734 bfd_mach_o_read_encryption_info (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_encryption_info() argument
4736 bfd_mach_o_encryption_info_command *cmd = &command->command.encryption_info; in bfd_mach_o_read_encryption_info()
4739 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_encryption_info()
4751 bfd_mach_o_read_encryption_info_64 (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_encryption_info_64() argument
4753 bfd_mach_o_encryption_info_command *cmd = &command->command.encryption_info; in bfd_mach_o_read_encryption_info_64()
4756 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_encryption_info_64()
4768 bfd_mach_o_read_main (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_main() argument
4770 bfd_mach_o_main_command *cmd = &command->command.main; in bfd_mach_o_read_main()
4773 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_main()
4784 bfd_mach_o_read_source_version (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_source_version() argument
4786 bfd_mach_o_source_version_command *cmd = &command->command.source_version; in bfd_mach_o_read_source_version()
4790 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_source_version()
4812 bfd_mach_o_read_note (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_note() argument
4814 bfd_mach_o_note_command *cmd = &command->command.note; in bfd_mach_o_read_note()
4817 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_note()
4829 bfd_mach_o_read_build_version (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_build_version() argument
4831 bfd_mach_o_build_version_command *cmd = &command->command.build_version; in bfd_mach_o_read_build_version()
4834 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_build_version()
4848 bfd_mach_o_load_command *command, in bfd_mach_o_read_segment() argument
4851 bfd_mach_o_segment_command *seg = &command->command.segment; in bfd_mach_o_read_segment()
4858 BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64); in bfd_mach_o_read_segment()
4860 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_segment()
4881 BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT); in bfd_mach_o_read_segment()
4883 if (command->len < sizeof (raw) + 8) in bfd_mach_o_read_segment()
4919 bfd_mach_o_read_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_segment_32() argument
4921 return bfd_mach_o_read_segment (abfd, command, 0); in bfd_mach_o_read_segment_32()
4925 bfd_mach_o_read_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) in bfd_mach_o_read_segment_64() argument
4927 return bfd_mach_o_read_segment (abfd, command, 1); in bfd_mach_o_read_segment_64()
4931 bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, in bfd_mach_o_read_command() argument
4939 if (bfd_seek (abfd, mdata->hdr_offset + command->offset, SEEK_SET) != 0 in bfd_mach_o_read_command()
4944 command->type = cmd & ~BFD_MACH_O_LC_REQ_DYLD; in bfd_mach_o_read_command()
4945 command->type_required = (cmd & BFD_MACH_O_LC_REQ_DYLD) != 0; in bfd_mach_o_read_command()
4946 command->len = bfd_h_get_32 (abfd, raw.cmdsize); in bfd_mach_o_read_command()
4947 if (command->len < 8 || command->len % 4 != 0) in bfd_mach_o_read_command()
4950 switch (command->type) in bfd_mach_o_read_command()
4953 if (!bfd_mach_o_read_segment_32 (abfd, command)) in bfd_mach_o_read_command()
4957 if (!bfd_mach_o_read_segment_64 (abfd, command)) in bfd_mach_o_read_command()
4961 if (!bfd_mach_o_read_symtab (abfd, command, filesize)) in bfd_mach_o_read_command()
4968 if (!bfd_mach_o_read_thread (abfd, command)) in bfd_mach_o_read_command()
4974 if (!bfd_mach_o_read_dylinker (abfd, command)) in bfd_mach_o_read_command()
4983 if (!bfd_mach_o_read_dylib (abfd, command)) in bfd_mach_o_read_command()
4987 if (!bfd_mach_o_read_prebound_dylib (abfd, command)) in bfd_mach_o_read_command()
4992 if (!bfd_mach_o_read_fvmlib (abfd, command)) in bfd_mach_o_read_command()
5006 if (!bfd_mach_o_read_str (abfd, command)) in bfd_mach_o_read_command()
5010 if (!bfd_mach_o_read_dysymtab (abfd, command, filesize)) in bfd_mach_o_read_command()
5014 if (!bfd_mach_o_read_prebind_cksum (abfd, command)) in bfd_mach_o_read_command()
5018 if (!bfd_mach_o_read_twolevel_hints (abfd, command)) in bfd_mach_o_read_command()
5022 if (!bfd_mach_o_read_uuid (abfd, command)) in bfd_mach_o_read_command()
5033 if (!bfd_mach_o_read_linkedit (abfd, command)) in bfd_mach_o_read_command()
5037 if (!bfd_mach_o_read_encryption_info (abfd, command)) in bfd_mach_o_read_command()
5041 if (!bfd_mach_o_read_encryption_info_64 (abfd, command)) in bfd_mach_o_read_command()
5045 if (!bfd_mach_o_read_dyld_info (abfd, command)) in bfd_mach_o_read_command()
5052 if (!bfd_mach_o_read_version_min (abfd, command)) in bfd_mach_o_read_command()
5056 if (!bfd_mach_o_read_main (abfd, command)) in bfd_mach_o_read_command()
5060 if (!bfd_mach_o_read_source_version (abfd, command)) in bfd_mach_o_read_command()
5066 if (!bfd_mach_o_read_note (abfd, command)) in bfd_mach_o_read_command()
5070 if (!bfd_mach_o_read_build_version (abfd, command)) in bfd_mach_o_read_command()
5074 command->len = 0; in bfd_mach_o_read_command()
5076 abfd, command->type); in bfd_mach_o_read_command()
5099 bfd_mach_o_segment_command *seg = &cmd->command.segment; in bfd_mach_o_flatten_sections()
5123 bfd_mach_o_segment_command *seg = &cmd->command.segment; in bfd_mach_o_flatten_sections()
5147 thr = &cmd->command.thread; in bfd_mach_o_scan_start_address()
5152 bfd_mach_o_main_command *main_cmd = &cmd->command.main; in bfd_mach_o_scan_start_address()
5492 struct bfd_mach_o_segment_command *segcmd = &cmd->command.segment; in bfd_mach_o_get_base_address()
5934 seg = &cmd->command.segment; in bfd_mach_o_core_fetch_environment()
6041 return &uuid_cmd->command.uuid; in bfd_mach_o_lookup_uuid_command()