Support DJGPP COFF targets in bfd_get_sign_extend_vma()
authorNick Clifton <nickc@redhat.com>
Tue, 3 Jul 2001 16:27:45 +0000 (16:27 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 3 Jul 2001 16:27:45 +0000 (16:27 +0000)
bfd/ChangeLog
bfd/bfd.c

index 30df566ea0d38fd2c0c66bb2422e6bcb86b1b6ad..aa2648c3a3d1ffed6331524fe11e884ec2ce0366 100644 (file)
@@ -1,5 +1,7 @@
 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
 
+       * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
+
        * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
        sections being discarded.
 
index 1f92762d2c3824c52d04b118f2389c5bd7915f21..0c2cc0cbef9c8d64e7b36cc49872cd7a165222b2 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -752,9 +752,21 @@ int
 bfd_get_sign_extend_vma (abfd)
      bfd *abfd;
 {
+  char *name;
+
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
     return (get_elf_backend_data (abfd)->sign_extend_vma);
 
+  name = bfd_get_target (abfd);
+
+  /* Return a proper value for DJGPP COFF (an x86 COFF variant).
+     This function is required for DWARF2 support, but there is
+     no place to store this information in the COFF back end.
+     Should enough other COFF targets add support for DWARF2,
+     a place will have to be found.  Until then, this hack will do.  */
+  if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0)
+    return 1;
+
   bfd_set_error (bfd_error_wrong_format);
   return -1;
 }
This page took 0.028831 seconds and 4 git commands to generate.