aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-02-25 19:42:43 +0000
committerIan Lance Taylor <ian@airs.com>1994-02-25 19:42:43 +0000
commit626f883f94be40ee68ef2ec0cb6da1d948207384 (patch)
tree02ead2ca6498a03a6659ccd11c0d1b61f7890f4b /bfd
parenta62494c41be4df5acbb36f1fac4ac6018771e60c (diff)
downloadgdb-626f883f94be40ee68ef2ec0cb6da1d948207384.zip
gdb-626f883f94be40ee68ef2ec0cb6da1d948207384.tar.gz
gdb-626f883f94be40ee68ef2ec0cb6da1d948207384.tar.bz2
* ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
boundary.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/ecoff.c46
2 files changed, 36 insertions, 21 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3fc690e..a6b8961 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+Fri Feb 25 11:41:57 1994 Ian Lance Taylor (ian@cygnus.com)
+
+ * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
+ boundary.
+
+Thu Feb 24 07:13:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
+ field for absolute symbols in the same manner as undefined
+ and common symbols.
+
Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* elfcode.h (elf_core_file_p): Check for core file e_machine match
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 1f74ca8..c99d724 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -2140,9 +2140,10 @@ ecoff_sizeof_headers (abfd, reloc)
if (strcmp (current->name, REGINFO) != 0)
++c;
- return (bfd_coff_filhsz (abfd)
- + bfd_coff_aoutsz (abfd)
- + c * bfd_coff_scnhsz (abfd));
+ ret = (bfd_coff_filhsz (abfd)
+ + bfd_coff_aoutsz (abfd)
+ + c * bfd_coff_scnhsz (abfd));
+ return BFD_ALIGN (ret, 16);
}
/* Get the contents of a section. This is where we handle reading the
@@ -2831,24 +2832,28 @@ ecoff_write_object_contents (abfd)
== false)
return false;
}
- else if ((abfd->flags & EXEC_P) != 0
- && (abfd->flags & D_PAGED) != 0)
- {
- char c;
+ }
- /* A demand paged executable must occupy an even number of
- pages. */
- if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1,
- SEEK_SET) != 0)
- return false;
- if (bfd_read (&c, 1, 1, abfd) == 0)
- c = 0;
- if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1,
- SEEK_SET) != 0)
- return false;
- if (bfd_write (&c, 1, 1, abfd) != 1)
- return false;
- }
+ /* The .bss section of a demand paged executable must receive an
+ entire page. If there are symbols, the symbols will start on the
+ next page. If there are no symbols, we must fill out the page by
+ hand. */
+ if (bfd_get_symcount (abfd) == 0
+ && (abfd->flags & EXEC_P) != 0
+ && (abfd->flags & D_PAGED) != 0)
+ {
+ char c;
+
+ if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1,
+ SEEK_SET) != 0)
+ return false;
+ if (bfd_read (&c, 1, 1, abfd) == 0)
+ c = 0;
+ if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1,
+ SEEK_SET) != 0)
+ return false;
+ if (bfd_write (&c, 1, 1, abfd) != 1)
+ return false;
}
return true;
@@ -3932,7 +3937,6 @@ ecoff_bfd_final_link (abfd, info)
/* We accumulate the debugging information counts in the symbolic
header. */
symhdr = &debug->symbolic_header;
- symhdr->magic = backend->debug_swap.sym_magic;
symhdr->vstamp = 0;
symhdr->ilineMax = 0;
symhdr->cbLine = 0;