444 extern const bfd_arch_info_type bfd_default_arch_struct;
445 arch_info = &bfd_default_arch_struct;
446 }
447 return arch_info;
448 }
449
450 static const char* native_arch_name() {
451 const char* res = NULL;
452 #ifdef LIBARCH_i386
453 res = "i386";
454 #endif
455 #ifdef LIBARCH_amd64
456 res = "i386:x86-64";
457 #endif
458 #ifdef LIBARCH_sparc
459 res = "sparc:v8plusb";
460 #endif
461 #ifdef LIBARCH_sparcv9
462 res = "sparc:v9b";
463 #endif
464 #ifdef LIBARCH_ppc64
465 res = "powerpc:common64";
466 #endif
467 #ifdef LIBARCH_aarch64
468 res = "aarch64";
469 #endif
470 if (res == NULL)
471 res = "architecture not set in Makefile!";
472 return res;
473 }
474
475 static enum bfd_endian native_endian() {
476 int32_t endian_test = 'x';
477 if (*(const char*) &endian_test == 'x')
478 return BFD_ENDIAN_LITTLE;
479 else
480 return BFD_ENDIAN_BIG;
481 }
482
483 static bfd* get_native_bfd(const bfd_arch_info_type* arch_info,
484 bfd* empty_bfd, bfd_target* empty_xvec) {
|
444 extern const bfd_arch_info_type bfd_default_arch_struct;
445 arch_info = &bfd_default_arch_struct;
446 }
447 return arch_info;
448 }
449
450 static const char* native_arch_name() {
451 const char* res = NULL;
452 #ifdef LIBARCH_i386
453 res = "i386";
454 #endif
455 #ifdef LIBARCH_amd64
456 res = "i386:x86-64";
457 #endif
458 #ifdef LIBARCH_sparc
459 res = "sparc:v8plusb";
460 #endif
461 #ifdef LIBARCH_sparcv9
462 res = "sparc:v9b";
463 #endif
464 #if defined(LIBARCH_ppc64) || defined(LIBARCH_ppc64le)
465 res = "powerpc:common64";
466 #endif
467 #ifdef LIBARCH_aarch64
468 res = "aarch64";
469 #endif
470 if (res == NULL)
471 res = "architecture not set in Makefile!";
472 return res;
473 }
474
475 static enum bfd_endian native_endian() {
476 int32_t endian_test = 'x';
477 if (*(const char*) &endian_test == 'x')
478 return BFD_ENDIAN_LITTLE;
479 else
480 return BFD_ENDIAN_BIG;
481 }
482
483 static bfd* get_native_bfd(const bfd_arch_info_type* arch_info,
484 bfd* empty_bfd, bfd_target* empty_xvec) {
|