[PATCH] bfd_get_sign_extend_vma
Mark E.
snowball3@bigfoot.com
Sun Jul 1 12:12:00 GMT 2001
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;
More information about the Binutils
mailing list