summaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-07-03 16:27:45 +0000
committerNick Clifton <nickc@redhat.com>2001-07-03 16:27:45 +0000
commitfe300c389a44876863ec0c2b2f7266d2a21b855f (patch)
tree91ff6aef9e5e1f794fa5dc6b684eb82940384478 /bfd/bfd.c
parent32fddcd14a7a63a94acdd421097b4a6c1147948e (diff)
downloadbinutils-redhat-fe300c389a44876863ec0c2b2f7266d2a21b855f.tar.gz
Support DJGPP COFF targets in bfd_get_sign_extend_vma()
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 1f92762d2c..0c2cc0cbef 100644
--- 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;
}