From 3fa785190a4f36a8889eea2fd2cb6c8ff90f3fa4 Mon Sep 17 00:00:00 2001 From: Svein Seldal Date: Wed, 4 Jun 2003 10:47:33 +0000 Subject: [PATCH] Altered the CREATE_xxx_COFF_TARGET_VEC macro arguments --- bfd/coff-a29k.c | 2 +- bfd/coff-apollo.c | 4 +- bfd/coff-arm.c | 4 +- bfd/coff-h8300.c | 2 +- bfd/coff-h8500.c | 2 +- bfd/coff-i960.c | 2 +- bfd/coff-m68k.c | 4 +- bfd/coff-m88k.c | 2 +- bfd/coff-mcore.c | 4 +- bfd/coff-sh.c | 6 +- bfd/coff-sparc.c | 2 +- bfd/coff-tic4x.c | 264 ++-------------------------------------------- bfd/coff-tic80.c | 2 +- bfd/coff-w65.c | 2 +- bfd/coff-we32k.c | 2 +- bfd/coff-z8k.c | 2 +- bfd/coffcode.h | 58 +++++++++- 17 files changed, 82 insertions(+), 282 deletions(-) diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c index fd547315fea..844d371a94f 100644 --- a/bfd/coff-a29k.c +++ b/bfd/coff-a29k.c @@ -580,4 +580,4 @@ coff_a29k_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp) #include "coffcode.h" -CREATE_BIG_COFF_TARGET_VEC (a29kcoff_big_vec, "coff-a29k-big", 0, SEC_READONLY, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (a29kcoff_big_vec, "coff-a29k-big", 0, SEC_READONLY, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-apollo.c b/bfd/coff-apollo.c index d7b921260bb..cf584538f6e 100644 --- a/bfd/coff-apollo.c +++ b/bfd/coff-apollo.c @@ -115,7 +115,7 @@ apollo_howto2rtype (internal) #endif #ifdef NAMES_HAVE_UNDERSCORE -CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL, COFF_SWAP_TABLE) #else -CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL) +CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL, COFF_SWAP_TABLE) #endif diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c index f089a6c824d..a88cdba0500 100644 --- a/bfd/coff-arm.c +++ b/bfd/coff-arm.c @@ -2623,5 +2623,5 @@ coff_arm_final_link_postscript (abfd, pfinfo) extern const bfd_target TARGET_BIG_SYM ; /* Target vectors. */ -CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM) -CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM) +CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM, COFF_SWAP_TABLE) +CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE) diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c index ac091533553..9ef907b87df 100644 --- a/bfd/coff-h8300.c +++ b/bfd/coff-h8300.c @@ -1398,4 +1398,4 @@ h8300_bfd_link_add_symbols (abfd, info) bfd_coff_reloc16_get_relocated_section_contents #define coff_bfd_relax_section bfd_coff_reloc16_relax_section -CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-h8500.c b/bfd/coff-h8500.c index 656bb48f37f..a94e4a30ec6 100644 --- a/bfd/coff-h8500.c +++ b/bfd/coff-h8500.c @@ -303,4 +303,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr) bfd_coff_reloc16_get_relocated_section_contents #define coff_bfd_relax_section bfd_coff_reloc16_relax_section -CREATE_BIG_COFF_TARGET_VEC (h8500coff_vec, "coff-h8500", 0, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (h8500coff_vec, "coff-h8500", 0, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c index eee6718a5ef..e4dc05322fa 100644 --- a/bfd/coff-i960.c +++ b/bfd/coff-i960.c @@ -617,7 +617,7 @@ coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp) extern const bfd_target icoff_big_vec; -CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec) +CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec, COFF_SWAP_TABLE) const bfd_target icoff_big_vec = { diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c index c2c1c295c86..a293b87b991 100644 --- a/bfd/coff-m68k.c +++ b/bfd/coff-m68k.c @@ -532,7 +532,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg) #endif #ifdef NAMES_HAVE_UNDERSCORE -CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE) #else -CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, 0, NULL) +CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, 0, NULL, COFF_SWAP_TABLE) #endif diff --git a/bfd/coff-m88k.c b/bfd/coff-m88k.c index f2d7ecc353f..aa88b99aa5c 100644 --- a/bfd/coff-m88k.c +++ b/bfd/coff-m88k.c @@ -288,4 +288,4 @@ reloc_processing (relent, reloc, symbols, abfd, section) #undef coff_write_armap -CREATE_BIG_COFF_TARGET_VEC (m88kbcs_vec, "coff-m88kbcs", 0, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (m88kbcs_vec, "coff-m88kbcs", 0, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c index 7847bb751b5..c30f5aa9b1d 100644 --- a/bfd/coff-mcore.c +++ b/bfd/coff-mcore.c @@ -593,7 +593,7 @@ extern const bfd_target TARGET_LITTLE_SYM; /* The transfer vectors that lead the outside world to all of the above. */ CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, (SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES), - 0, & TARGET_LITTLE_SYM) + 0, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE) CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, (SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES), - 0, & TARGET_BIG_SYM) + 0, & TARGET_BIG_SYM, COFF_SWAP_TABLE) diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index bcf059d299e..c9997dbedd4 100644 --- a/bfd/coff-sh.c +++ b/bfd/coff-sh.c @@ -3132,7 +3132,7 @@ sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order, /* The target vectors. */ #ifndef TARGET_SHL_SYM -CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE) #endif #ifdef TARGET_SHL_SYM @@ -3147,10 +3147,10 @@ CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NUL #ifdef COFF_WITH_PE CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE, - SEC_CODE | SEC_DATA, '_', NULL); + SEC_CODE | SEC_DATA, '_', NULL, COFF_SWAP_TABLE); #else CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE, - 0, '_', NULL) + 0, '_', NULL, COFF_SWAP_TABLE) #endif #ifndef TARGET_SHL_SYM diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c index 4053a6d5f4b..acfa6d4924a 100644 --- a/bfd/coff-sparc.c +++ b/bfd/coff-sparc.c @@ -216,4 +216,4 @@ rtype2howto (cache_ptr, dst) #define TARGET_NAME "coff-sparc" #endif -CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c index 8477f475d29..0edd8341ff6 100644 --- a/bfd/coff-tic4x.c +++ b/bfd/coff-tic4x.c @@ -363,271 +363,21 @@ static const bfd_coff_backend_data ticoff1_swap_table = }; + /* TI COFF v0, DOS tools (little-endian headers). */ -const bfd_target tic4x_coff0_vec = -{ - "coff0-tic4x", /* Name. */ - bfd_target_coff_flavour, - BFD_ENDIAN_LITTLE, /* Data byte order is little. */ - BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */ - - (HAS_RELOC | EXEC_P | /* Object flags. */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */ - '_', /* Leading symbol underscore. */ - '/', /* ar_pad_char. */ - 15, /* ar_max_namelen. */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */ - - {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, _bfd_dummy_target}, - {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ - bfd_false}, - {bfd_false, coff_write_object_contents, /* bfd_write_contents */ - _bfd_write_archive_contents, bfd_false}, - - BFD_JUMP_TABLE_GENERIC (coff), - BFD_JUMP_TABLE_COPY (coff), - BFD_JUMP_TABLE_CORE (_bfd_nocore), - BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), - BFD_JUMP_TABLE_SYMBOLS (coff), - BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (coff), - BFD_JUMP_TABLE_LINK (coff), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - NULL, - - (PTR)&ticoff0_swap_table -}; +CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x", HAS_LOAD_PAGE, 0, '_', NULL, (PTR)&ticoff0_swap_table); /* TI COFF v0, SPARC tools (big-endian headers). */ -const bfd_target tic4x_coff0_beh_vec = -{ - "coff0-beh-tic4x", /* Name. */ - bfd_target_coff_flavour, - BFD_ENDIAN_LITTLE, /* Data byte order is little. */ - BFD_ENDIAN_BIG, /* Header byte order is big. */ - - (HAS_RELOC | EXEC_P | /* Object flags. */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */ - '_', /* Leading symbol underscore. */ - '/', /* ar_pad_char */ - 15, /* ar_max_namelen */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */ - bfd_getb64, bfd_getb_signed_64, bfd_putb64, - bfd_getb32, bfd_getb_signed_32, bfd_putb32, - bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */ - - {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, _bfd_dummy_target}, - {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ - bfd_false}, - {bfd_false, coff_write_object_contents, /* bfd_write_contents */ - _bfd_write_archive_contents, bfd_false}, - - BFD_JUMP_TABLE_GENERIC (coff), - BFD_JUMP_TABLE_COPY (coff), - BFD_JUMP_TABLE_CORE (_bfd_nocore), - BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), - BFD_JUMP_TABLE_SYMBOLS (coff), - BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (coff), - BFD_JUMP_TABLE_LINK (coff), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - - &tic4x_coff0_vec, - - (PTR)&ticoff0_swap_table -}; +CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_vec, (PTR)&ticoff0_swap_table); /* TI COFF v1, DOS tools (little-endian headers). */ -const bfd_target tic4x_coff1_vec = -{ - "coff1-tic4x", /* Name. */ - bfd_target_coff_flavour, - BFD_ENDIAN_LITTLE, /* Data byte order is little. */ - BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */ - - (HAS_RELOC | EXEC_P | /* Object flags. */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */ - '_', /* Leading symbol underscore. */ - '/', /* ar_pad_char */ - 15, /* ar_max_namelen */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */ - - {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, _bfd_dummy_target}, - {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ - bfd_false}, - {bfd_false, coff_write_object_contents, /* bfd_write_contents */ - _bfd_write_archive_contents, bfd_false}, - - BFD_JUMP_TABLE_GENERIC (coff), - BFD_JUMP_TABLE_COPY (coff), - BFD_JUMP_TABLE_CORE (_bfd_nocore), - BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), - BFD_JUMP_TABLE_SYMBOLS (coff), - BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (coff), - BFD_JUMP_TABLE_LINK (coff), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - - &tic4x_coff0_beh_vec, - - (PTR)&ticoff1_swap_table -}; +CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_beh_vec, (PTR)&ticoff1_swap_table); /* TI COFF v1, SPARC tools (big-endian headers). */ -const bfd_target tic4x_coff1_beh_vec = -{ - "coff1-beh-tic4x", /* Name. */ - bfd_target_coff_flavour, - BFD_ENDIAN_LITTLE, /* Data byte order is little. */ - BFD_ENDIAN_BIG, /* Header byte order is big. */ - - (HAS_RELOC | EXEC_P | /* Object flags. */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */ - '_', /* Leading symbol underscore. */ - '/', /* ar_pad_char */ - 15, /* ar_max_namelen */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */ - bfd_getb64, bfd_getb_signed_64, bfd_putb64, - bfd_getb32, bfd_getb_signed_32, bfd_putb32, - bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */ - - {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, _bfd_dummy_target}, - {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ - bfd_false}, - {bfd_false, coff_write_object_contents, /* bfd_write_contents */ - _bfd_write_archive_contents, bfd_false}, - - BFD_JUMP_TABLE_GENERIC (coff), - BFD_JUMP_TABLE_COPY (coff), - BFD_JUMP_TABLE_CORE (_bfd_nocore), - BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), - BFD_JUMP_TABLE_SYMBOLS (coff), - BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (coff), - BFD_JUMP_TABLE_LINK (coff), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - - &tic4x_coff1_vec, - - (PTR)&ticoff1_swap_table -}; +CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_vec, (PTR)&ticoff1_swap_table); /* TI COFF v2, TI DOS tools output (little-endian headers). */ -const bfd_target tic4x_coff2_vec = -{ - "coff2-tic4x", /* Name. */ - bfd_target_coff_flavour, - BFD_ENDIAN_LITTLE, /* Data byte order is little. */ - BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */ - - (HAS_RELOC | EXEC_P | /* Object flags. */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */ - '_', /* Leading symbol underscore. */ - '/', /* ar_pad_char */ - 15, /* ar_max_namelen */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */ - - {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, _bfd_dummy_target}, - {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ - bfd_false}, - {bfd_false, coff_write_object_contents, /* bfd_write_contents */ - _bfd_write_archive_contents, bfd_false}, - - BFD_JUMP_TABLE_GENERIC (coff), - BFD_JUMP_TABLE_COPY (coff), - BFD_JUMP_TABLE_CORE (_bfd_nocore), - BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), - BFD_JUMP_TABLE_SYMBOLS (coff), - BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (coff), - BFD_JUMP_TABLE_LINK (coff), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - - &tic4x_coff1_beh_vec, - - COFF_SWAP_TABLE -}; +CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_beh_vec, COFF_SWAP_TABLE); /* TI COFF v2, TI SPARC tools output (big-endian headers). */ -const bfd_target tic4x_coff2_beh_vec = -{ - "coff2-beh-tic4x", /* Name. */ - bfd_target_coff_flavour, - BFD_ENDIAN_LITTLE, /* Data byte order is little. */ - BFD_ENDIAN_BIG, /* Header byte order is big. */ - - (HAS_RELOC | EXEC_P | /* Object flags. */ - HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ), - - (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */ - '_', /* Leading symbol underscore. */ - '/', /* ar_pad_char */ - 15, /* ar_max_namelen */ - bfd_getl64, bfd_getl_signed_64, bfd_putl64, - bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */ - bfd_getb64, bfd_getb_signed_64, bfd_putb64, - bfd_getb32, bfd_getb_signed_32, bfd_putb32, - bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */ - - {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ - bfd_generic_archive_p, _bfd_dummy_target}, - {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ - bfd_false}, - {bfd_false, coff_write_object_contents, /* bfd_write_contents */ - _bfd_write_archive_contents, bfd_false}, - - BFD_JUMP_TABLE_GENERIC (coff), - BFD_JUMP_TABLE_COPY (coff), - BFD_JUMP_TABLE_CORE (_bfd_nocore), - BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), - BFD_JUMP_TABLE_SYMBOLS (coff), - BFD_JUMP_TABLE_RELOCS (coff), - BFD_JUMP_TABLE_WRITE (coff), - BFD_JUMP_TABLE_LINK (coff), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - - &tic4x_coff2_vec, - - COFF_SWAP_TABLE -}; +CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff2_vec, COFF_SWAP_TABLE); diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c index 4185e7b18d8..7329b7b0dcd 100644 --- a/bfd/coff-tic80.c +++ b/bfd/coff-tic80.c @@ -719,4 +719,4 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd, #undef C_LASTENT /* Clashes with TIc80's C_STATLAB */ #include "coffcode.h" -CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL) +CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c index 093764a0da0..cc31a23108d 100644 --- a/bfd/coff-w65.c +++ b/bfd/coff-w65.c @@ -380,4 +380,4 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, bfd_coff_reloc16_get_relocated_section_contents #define coff_bfd_relax_section bfd_coff_reloc16_relax_section -CREATE_LITTLE_COFF_TARGET_VEC (w65_vec, "coff-w65", BFD_IS_RELAXABLE, 0, '_', NULL) +CREATE_LITTLE_COFF_TARGET_VEC (w65_vec, "coff-w65", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-we32k.c b/bfd/coff-we32k.c index fb674a95806..b71df53ce81 100644 --- a/bfd/coff-we32k.c +++ b/bfd/coff-we32k.c @@ -66,4 +66,4 @@ static reloc_howto_type howto_table[] = #define coff_write_armap bsd_write_armap -CREATE_BIG_COFF_TARGET_VEC (we32kcoff_vec, "coff-we32k", 0, 0, 0, NULL) +CREATE_BIG_COFF_TARGET_VEC (we32kcoff_vec, "coff-we32k", 0, 0, 0, NULL, COFF_SWAP_TABLE) diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c index 068cfac7b6b..3337376fadb 100644 --- a/bfd/coff-z8k.c +++ b/bfd/coff-z8k.c @@ -350,4 +350,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr) bfd_coff_reloc16_get_relocated_section_contents #define coff_bfd_relax_section bfd_coff_reloc16_relax_section -CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL) +CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL, COFF_SWAP_TABLE) diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 31338ee99ea..514372c7341 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5413,7 +5413,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table = #define coff_bfd_discard_group bfd_generic_discard_group #endif -#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \ +#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \ const bfd_target VAR = \ { \ NAME , \ @@ -5460,10 +5460,60 @@ const bfd_target VAR = \ \ ALTERNATIVE, \ \ - COFF_SWAP_TABLE \ + SWAP_TABLE \ }; -#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \ +#define CREATE_BIGHDR_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \ +const bfd_target VAR = \ +{ \ + NAME , \ + bfd_target_coff_flavour, \ + BFD_ENDIAN_LITTLE, /* data byte order is little */ \ + BFD_ENDIAN_BIG, /* header byte order is big */ \ + /* object flags */ \ + (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \ + HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \ + /* section flags */ \ + (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\ + UNDER, /* leading symbol underscore */ \ + '/', /* ar_pad_char */ \ + 15, /* ar_max_namelen */ \ + \ + /* Data conversion functions. */ \ + bfd_getb64, bfd_getb_signed_64, bfd_putb64, \ + bfd_getb32, bfd_getb_signed_32, bfd_putb32, \ + bfd_getb16, bfd_getb_signed_16, bfd_putb16, \ + \ + /* Header conversion functions. */ \ + bfd_getb64, bfd_getb_signed_64, bfd_putb64, \ + bfd_getb32, bfd_getb_signed_32, bfd_putb32, \ + bfd_getb16, bfd_getb_signed_16, bfd_putb16, \ + \ + /* bfd_check_format */ \ + { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \ + _bfd_dummy_target }, \ + /* bfd_set_format */ \ + { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \ + /* bfd_write_contents */ \ + { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \ + bfd_false }, \ + \ + BFD_JUMP_TABLE_GENERIC (coff), \ + BFD_JUMP_TABLE_COPY (coff), \ + BFD_JUMP_TABLE_CORE (_bfd_nocore), \ + BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), \ + BFD_JUMP_TABLE_SYMBOLS (coff), \ + BFD_JUMP_TABLE_RELOCS (coff), \ + BFD_JUMP_TABLE_WRITE (coff), \ + BFD_JUMP_TABLE_LINK (coff), \ + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), \ + \ + ALTERNATIVE, \ + \ + SWAP_TABLE \ +}; + +#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \ const bfd_target VAR = \ { \ NAME , \ @@ -5508,5 +5558,5 @@ const bfd_target VAR = \ \ ALTERNATIVE, \ \ - COFF_SWAP_TABLE \ + SWAP_TABLE \ }; -- 2.30.2