* targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
[binutils-gdb.git] / bfd / aout-target.h
index 6e0fccc6869211c0906e8aa322768ef9554d488e..c66e433cbbaf1b562876446ad2066561ead8d33c 100644 (file)
@@ -43,6 +43,10 @@ MY(callback) (abfd)
   obj_datasec (abfd)->vma = N_DATADDR(*execp);
   obj_bsssec  (abfd)->vma = N_BSSADDR(*execp);
 
+  obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
+  obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
+  obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
+
   /* The file offsets of the sections */
   obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
   obj_datasec (abfd)->filepos = N_DATOFF (*execp);
@@ -85,11 +89,11 @@ MY(callback) (abfd)
   /* Don't set sizes now -- can't be sure until we know arch & mach.
      Sizes get set in set_sizes callback, later.  */
 #if 0
-  adata(abfd).page_size = PAGE_SIZE;
+  adata(abfd).page_size = TARGET_PAGE_SIZE;
 #ifdef SEGMENT_SIZE
   adata(abfd).segment_size = SEGMENT_SIZE;
 #else
-  adata(abfd).segment_size = PAGE_SIZE;
+  adata(abfd).segment_size = TARGET_PAGE_SIZE;
 #endif
   adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
 #endif
@@ -170,11 +174,11 @@ MY(mkobject) (abfd)
     return false;
 #if 0 /* Sizes get set in set_sizes callback, later, after we know
         the architecture and machine.  */
-  adata(abfd).page_size = PAGE_SIZE;
+  adata(abfd).page_size = TARGET_PAGE_SIZE;
 #ifdef SEGMENT_SIZE
   adata(abfd).segment_size = SEGMENT_SIZE;
 #else
-  adata(abfd).segment_size = PAGE_SIZE;
+  adata(abfd).segment_size = TARGET_PAGE_SIZE;
 #endif
   adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
 #endif
@@ -236,18 +240,18 @@ static boolean
 MY(set_sizes) (abfd)
      bfd *abfd;
 {
-  adata(abfd).page_size = PAGE_SIZE;
+  adata(abfd).page_size = TARGET_PAGE_SIZE;
 
 #ifdef SEGMENT_SIZE
   adata(abfd).segment_size = SEGMENT_SIZE;
 #else
-  adata(abfd).segment_size = PAGE_SIZE;
+  adata(abfd).segment_size = TARGET_PAGE_SIZE;
 #endif
 
 #ifdef ZMAGIC_DISK_BLOCK_SIZE
   adata(abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE;
 #else
-  adata(abfd).zmagic_disk_block_size = PAGE_SIZE;
+  adata(abfd).zmagic_disk_block_size = TARGET_PAGE_SIZE;
 #endif
 
   adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
@@ -349,6 +353,9 @@ MY_bfd_final_link (abfd, info)
 #ifndef        MY_openr_next_archived_file
 #define        MY_openr_next_archived_file     bfd_generic_openr_next_archived_file
 #endif
+#ifndef MY_get_elt_at_index
+#define MY_get_elt_at_index            _bfd_generic_get_elt_at_index
+#endif
 #ifndef        MY_generic_stat_arch_elt
 #define        MY_generic_stat_arch_elt        bfd_generic_stat_arch_elt
 #endif
@@ -365,6 +372,9 @@ MY_bfd_final_link (abfd, info)
 #ifndef        MY_write_armap
 #define        MY_write_armap          bsd_write_armap
 #endif
+#ifndef MY_read_ar_hdr
+#define MY_read_ar_hdr         _bfd_generic_read_ar_hdr
+#endif
 #ifndef        MY_truncate_arname
 #define        MY_truncate_arname              bfd_bsd_truncate_arname
 #endif
@@ -413,6 +423,9 @@ MY_bfd_final_link (abfd, info)
 #ifndef MY_get_section_contents
 #define MY_get_section_contents NAME(aout,get_section_contents)
 #endif
+#ifndef MY_get_section_contents_in_window
+#define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+#endif
 #ifndef MY_new_section_hook
 #define MY_new_section_hook NAME(aout,new_section_hook)
 #endif
@@ -544,11 +557,11 @@ const bfd_target MY(vec) =
   TARGETNAME,          /* name */
   bfd_target_aout_flavour,
 #ifdef TARGET_IS_BIG_ENDIAN_P
-  true,                                /* target byte order (big) */
-  true,                                /* target headers byte order (big) */
+  BFD_ENDIAN_BIG,              /* target byte order (big) */
+  BFD_ENDIAN_BIG,              /* target headers byte order (big) */
 #else
-  false,                       /* target byte order (little) */
-  false,                       /* target headers byte order (little) */
+  BFD_ENDIAN_LITTLE,           /* target byte order (little) */
+  BFD_ENDIAN_LITTLE,           /* target headers byte order (little) */
 #endif
   (HAS_RELOC | EXEC_P |                /* object flags */
    HAS_LINENO | HAS_DEBUG |