aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-12-13 18:21:03 +0000
committerIan Lance Taylor <ian@airs.com>1996-12-13 18:21:03 +0000
commit6270adfb595310da7741a39b57bfe633a9448e5b (patch)
tree6a78d6ff80557aefa475a37ccd5cf735336a7ef9
parent8a8121d51be4c66aad42c69dd8c25b40a58509b9 (diff)
downloadgdb-6270adfb595310da7741a39b57bfe633a9448e5b.zip
gdb-6270adfb595310da7741a39b57bfe633a9448e5b.tar.gz
gdb-6270adfb595310da7741a39b57bfe633a9448e5b.tar.bz2
Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
* coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k if NAMES_HAVE_UNDERSCORE is defined.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coffcode.h16
2 files changed, 19 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1c0014f..425d392 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
+
+ * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
+ if NAMES_HAVE_UNDERSCORE is defined.
+
Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 508f75e..347854a 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1932,8 +1932,13 @@ coff_set_flags (abfd, magicp, flagsp)
#ifdef APOLLOM68KMAGIC
*magicp = APOLLO_COFF_VERSION_NUMBER;
#else
+ /* NAMES_HAVE_UNDERSCORE may be defined by coff-u68k.c. */
+#ifdef NAMES_HAVE_UNDERSCORE
+ *magicp = MC68KBCSMAGIC;
+#else
*magicp = MC68MAGIC;
#endif
+#endif
#ifdef LYNXOS
/* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
@@ -2217,8 +2222,14 @@ coff_compute_section_file_positions (abfd)
#ifndef I960
/* make sure that this section is of the right size too */
if ((abfd->flags & EXEC_P) == 0)
- current->_raw_size = BFD_ALIGN (current->_raw_size,
- 1 << current->alignment_power);
+ {
+ bfd_size_type old_size;
+
+ old_size = current->_raw_size;
+ current->_raw_size = BFD_ALIGN (current->_raw_size,
+ 1 << current->alignment_power);
+ sofar += current->_raw_size - old_size;
+ }
else
{
old_sofar = sofar;
@@ -3663,6 +3674,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
(*_bfd_error_handler)
("%s: illegal relocation type %d at address 0x%lx",
bfd_get_filename (abfd), dst.r_type, (long) dst.r_vaddr);
+ bfd_set_error (bfd_error_bad_value);
return false;
}
}