summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/bfd/i386msdos.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-06-10 10:55:58 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-06-10 10:55:58 +0000
commita7e831079363e3bb45f3172f6e59ba48e335682b (patch)
treeee4324eac9a9d66f189fab60498ec42b8226b7fc /gnu/usr.bin/binutils/bfd/i386msdos.c
parent467cb0a471d13c5186a6ee166e60b47c30da64e9 (diff)
Bring Cygnus versions into the trunk, keeping our local patches
Diffstat (limited to 'gnu/usr.bin/binutils/bfd/i386msdos.c')
-rw-r--r--gnu/usr.bin/binutils/bfd/i386msdos.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/gnu/usr.bin/binutils/bfd/i386msdos.c b/gnu/usr.bin/binutils/bfd/i386msdos.c
index 796be2dead3..24a456bea23 100644
--- a/gnu/usr.bin/binutils/bfd/i386msdos.c
+++ b/gnu/usr.bin/binutils/bfd/i386msdos.c
@@ -28,25 +28,6 @@
#include "libaout.h"
#if 0
-typedef struct msdos_data_struct
- {
-#if 0
- srec_data_list_type *head;
- unsigned int type;
-
- int done_symbol_read;
- int count;
- asymbol *symbols;
- char *strings;
- int symbol_idx;
- int string_size;
- int string_idx;
-#endif
- }
-tdata_type;
-#endif
-
-#if 0
struct exe_header
{
unsigned short magic;
@@ -95,6 +76,8 @@ 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)
+ continue;
if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
{
bfd_vma sec_vma = bfd_get_section_vma (abfd, sec)
@@ -210,8 +193,8 @@ const bfd_target i386msdos_vec =
{
"msdos", /* name */
bfd_target_msdos_flavour,
- false, /* target byte order */
- false, /* target headers byte order */
+ BFD_ENDIAN_LITTLE, /* target byte order */
+ BFD_ENDIAN_LITTLE, /* target headers byte order */
(EXEC_P), /* object flags */
(SEC_CODE | SEC_DATA | SEC_HAS_CONTENTS
| SEC_ALLOC | SEC_LOAD), /* section flags */