static bfd_boolean MY(write_object_contents) (bfd *abfd) { struct external_exec exec_bytes; struct internal_exec *execp = exec_hdr (abfd); obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; BFD_ASSERT (bfd_get_arch (abfd) == bfd_arch_ns32k); switch (bfd_get_mach (abfd)) { case 32032: N_SET_MACHTYPE (execp, M_NS32032); break; case 32532: default: N_SET_MACHTYPE (execp, M_NS32532); break; } N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags); WRITE_HEADERS (abfd, execp); return TRUE; }
static bfd_boolean MY(write_object_contents)(bfd *abfd) { struct external_exec exec_bytes; struct internal_exec *execp = exec_hdr(abfd); /* Magic number, maestro, please! */ switch (bfd_get_arch(abfd)) { case bfd_arch_m68k: switch (bfd_get_mach (abfd)) { case bfd_mach_m68010: N_SET_MACHTYPE (*execp, M_68010); break; default: case bfd_mach_m68020: N_SET_MACHTYPE (*execp, M_68020); break; } break; case bfd_arch_sparc: N_SET_MACHTYPE (*execp, M_SPARC); break; case bfd_arch_i386: N_SET_MACHTYPE (*execp, M_386); break; case bfd_arch_a29k: N_SET_MACHTYPE (*execp, M_29K); break; case bfd_arch_mips: switch (bfd_get_mach (abfd)) { case bfd_mach_mips4000: case bfd_mach_mips6000: N_SET_MACHTYPE (*execp, M_MIPS2); break; default: N_SET_MACHTYPE (*execp, M_MIPS1); break; } break; default: N_SET_MACHTYPE (*execp, M_UNKNOWN); } MY (choose_reloc_size) (abfd); WRITE_HEADERS (abfd, execp); return TRUE; }
/* Set the machine type correctly: */ static bfd_boolean i386linux_write_object_contents(bfd *abfd) { struct external_exec exec_bytes; struct internal_exec *execp = exec_hdr(abfd); N_SET_MACHTYPE (*execp, M_386); obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; WRITE_HEADERS(abfd, execp); return TRUE; }
/* Write an object file in LynxOS format. * Section contents have already been written. We write the * file header, symbols, and relocation. */ static bfd_boolean NAME(aout,sparclynx_write_object_contents)(bfd *abfd) { struct external_exec exec_bytes; struct internal_exec *execp = exec_hdr(abfd); /* Magic number, maestro, please! */ switch (bfd_get_arch(abfd)) { case bfd_arch_m68k: switch (bfd_get_mach(abfd)) { case bfd_mach_m68010: N_SET_MACHTYPE (*execp, M_68010); break; default: case bfd_mach_m68020: N_SET_MACHTYPE (*execp, M_68020); break; } break; case bfd_arch_sparc: N_SET_MACHTYPE (*execp, M_SPARC); break; case bfd_arch_i386: N_SET_MACHTYPE (*execp, M_386); break; case bfd_arch_a29k: N_SET_MACHTYPE (*execp, M_29K); break; default: N_SET_MACHTYPE (*execp, M_UNKNOWN); } choose_reloc_size (abfd); N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags); WRITE_HEADERS (abfd, execp); return TRUE; }