2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / bfd / i386msdos.c
index 9d5cb05723dfa709145c15cda2971298774d0bc0..a1a7baa13e796573bdb67e78ede6f570ee25c172 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for MS-DOS executables.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002
-   Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
+   2003, 2004 Free Software Foundation, Inc.
    Written by Bryan Ford of the University of Utah.
 
    Contributed by the Center for Software Science at the
@@ -61,7 +61,7 @@ static int msdos_sizeof_headers
 static bfd_boolean msdos_write_object_contents
   PARAMS ((bfd *));
 static bfd_boolean msdos_set_section_contents
-  PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+  PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
 
 static int
 msdos_sizeof_headers (abfd, exec)
@@ -83,20 +83,19 @@ msdos_write_object_contents (abfd)
   /* Find the total size of the program on disk and in memory.  */
   for (sec = abfd->sections; sec != (asection *) NULL; sec = sec->next)
     {
-      if (bfd_get_section_size_before_reloc (sec) == 0)
+      if (sec->size == 0)
         continue;
       if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
         {
-         bfd_vma sec_vma = bfd_get_section_vma (abfd, sec)
-                           + bfd_get_section_size_before_reloc (sec);
+         bfd_vma sec_vma = bfd_get_section_vma (abfd, sec) + sec->size;
          if (sec_vma > high_vma)
            high_vma = sec_vma;
        }
       if (bfd_get_section_flags (abfd, sec) & SEC_LOAD)
         {
-         file_ptr sec_end = sizeof(hdr)
-                            + bfd_get_section_vma (abfd, sec)
-                            + bfd_get_section_size_before_reloc (sec);
+         file_ptr sec_end = (sizeof (hdr)
+                             + bfd_get_section_vma (abfd, sec)
+                             + sec->size);
          if (sec_end > outfile_size)
            outfile_size = sec_end;
        }
@@ -139,7 +138,7 @@ static bfd_boolean
 msdos_set_section_contents (abfd, section, location, offset, count)
      bfd *abfd;
      sec_ptr section;
-     PTR location;
+     const PTR location;
      file_ptr offset;
      bfd_size_type count;
 {
@@ -176,7 +175,10 @@ msdos_set_section_contents (abfd, section, location, offset, count)
 #define msdos_bfd_relax_section bfd_generic_relax_section
 #define msdos_bfd_gc_sections bfd_generic_gc_sections
 #define msdos_bfd_merge_sections bfd_generic_merge_sections
+#define msdos_bfd_is_group_section bfd_generic_is_group_section
 #define msdos_bfd_discard_group bfd_generic_discard_group
+#define msdos_section_already_linked \
+  _bfd_generic_section_already_linked
 #define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
@@ -191,6 +193,7 @@ msdos_set_section_contents (abfd, section, location, offset, count)
 #define msdos_get_symbol_info _bfd_nosymbols_get_symbol_info
 #define msdos_find_nearest_line _bfd_nosymbols_find_nearest_line
 #define msdos_get_lineno _bfd_nosymbols_get_lineno
+#define msdos_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
 #define msdos_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
 #define msdos_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
 #define msdos_read_minisymbols _bfd_nosymbols_read_minisymbols
This page took 0.028287 seconds and 4 git commands to generate.