810-debian_bfd-no-kylix-crash.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Status: committed upstream after 6.3.
  2. Fix a crash triggered by Kylix libraries.
  3. 2004-12-06 Daniel Jacobowitz <dan@debian.org>
  4. Suggested by Fergal Daly <fergal@esatclear.ie>:
  5. * simple.c (simple_dummy_multiple_definition): New function.
  6. (bfd_simple_get_relocated_section_contents): Use it.
  7. Index: src/bfd/simple.c
  8. ===================================================================
  9. RCS file: /cvs/src/src/bfd/simple.c,v
  10. retrieving revision 1.19
  11. retrieving revision 1.20
  12. Index: gdb-6.3/bfd/simple.c
  13. ===================================================================
  14. --- gdb-6.3.orig/bfd/simple.c 2004-09-24 03:07:19.000000000 -0400
  15. +++ gdb-6.3/bfd/simple.c 2004-12-08 18:25:58.415216808 -0500
  16. @@ -78,6 +78,19 @@ simple_dummy_unattached_reloc (struct bf
  17. return TRUE;
  18. }
  19. +static bfd_boolean
  20. +simple_dummy_multiple_definition (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
  21. + const char *name ATTRIBUTE_UNUSED,
  22. + bfd *obfd ATTRIBUTE_UNUSED,
  23. + asection *osec ATTRIBUTE_UNUSED,
  24. + bfd_vma oval ATTRIBUTE_UNUSED,
  25. + bfd *nbfd ATTRIBUTE_UNUSED,
  26. + asection *nsec ATTRIBUTE_UNUSED,
  27. + bfd_vma nval ATTRIBUTE_UNUSED)
  28. +{
  29. + return TRUE;
  30. +}
  31. +
  32. struct saved_output_info
  33. {
  34. bfd_vma offset;
  35. @@ -172,6 +185,7 @@ bfd_simple_get_relocated_section_content
  36. callbacks.reloc_overflow = simple_dummy_reloc_overflow;
  37. callbacks.reloc_dangerous = simple_dummy_reloc_dangerous;
  38. callbacks.unattached_reloc = simple_dummy_unattached_reloc;
  39. + callbacks.multiple_definition = simple_dummy_multiple_definition;
  40. memset (&link_order, 0, sizeof (link_order));
  41. link_order.next = NULL;