This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] bfd_get_sign_extend_vma
- To: binutils at sources dot redhat dot com
- Subject: [PATCH] bfd_get_sign_extend_vma
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Sun, 1 Jul 2001 15:12:38 -0400
Hello folks,
If acceptable, please apply this patch for finishing dwarf2 support for djgpp. Tested
with a very recent weekly snapshot of gdb.
bfd/ChangeLog:
2001-07-01 Mark Elbrecht <snowball3@softhome.net>
* bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
Index: bfd.c
===================================================================
RCS file: /cvs/src/src/bfd/bfd.c,v
retrieving revision 1.12
diff -c -p -r1.12 bfd.c
*** bfd.c 2001/05/11 12:23:47 1.12
--- bfd.c 2001/07/01 18:05:34
*************** int
*** 752,759 ****
--- 752,771 ----
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;