Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/elftoolchain/elfcopy/main.c
Show First 20 Lines • Show All 1,388 Lines • ▼ Show 20 Lines | set_output_target(struct elfcopy *ecp, const char *target_name) | ||||
if ((tgt = elftc_bfd_find_target(target_name)) == NULL) | if ((tgt = elftc_bfd_find_target(target_name)) == NULL) | ||||
errx(EXIT_FAILURE, "%s: invalid target name", target_name); | errx(EXIT_FAILURE, "%s: invalid target name", target_name); | ||||
ecp->otf = elftc_bfd_target_flavor(tgt); | ecp->otf = elftc_bfd_target_flavor(tgt); | ||||
if (ecp->otf == ETF_ELF) { | if (ecp->otf == ETF_ELF) { | ||||
ecp->oec = elftc_bfd_target_class(tgt); | ecp->oec = elftc_bfd_target_class(tgt); | ||||
ecp->oed = elftc_bfd_target_byteorder(tgt); | ecp->oed = elftc_bfd_target_byteorder(tgt); | ||||
ecp->oem = elftc_bfd_target_machine(tgt); | ecp->oem = elftc_bfd_target_machine(tgt); | ||||
ecp->abi = elftc_bfd_target_osabi(tgt); | |||||
} | } | ||||
if (ecp->otf == ETF_EFI || ecp->otf == ETF_PE) | if (ecp->otf == ETF_EFI || ecp->otf == ETF_PE) | ||||
ecp->oem = elftc_bfd_target_machine(tgt); | ecp->oem = elftc_bfd_target_machine(tgt); | ||||
ecp->otgt = target_name; | ecp->otgt = target_name; | ||||
} | } | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |