* elf32-vax.c (elf_vax_relocate_section)
[deliverable/binutils-gdb.git] / bfd / coff-rs6000.c
index 21da658d2da6d910d8893f78d72d3c06cae954ec..ffa7a654fe6c4ca2a49987426991ccc6e771c1ae 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for IBM RS/6000 "XCOFF" files.
    Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009, 2010
+   2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
    Archive support from Damon A. Permezel.
@@ -405,6 +405,50 @@ _bfd_xcoff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
 {
   return FALSE;
 }
+
+static const struct dwarf_debug_section xcoff_debug_sections[] =
+{
+  { ".dwabrev",                NULL },
+  { ".dwarnge",                NULL },
+  { NULL,      NULL }, /* .debug_frame */
+  { ".dwinfo",         NULL },
+  { ".dwline",         NULL },
+  { NULL,      NULL }, /* .debug_loc */
+  { NULL,      NULL }, /* .debug_macinfo */
+  { NULL,      NULL }, /* .debug_macro */
+  { ".dwpbnms",                NULL },
+  { ".dwpbtyp",                NULL },
+  { ".dwrnges",                NULL },
+  { NULL,      NULL }, /* .debug_static_func */
+  { NULL,      NULL }, /* .debug_static_vars */
+  { ".dwstr",  NULL },
+  { NULL,      NULL }, /* .debug_types */
+  /* GNU DWARF 1 extensions */
+  { NULL,      NULL }, /* .debug_sfnames */
+  { NULL,      NULL }, /* .debug_srcinfo */
+  /* SGI/MIPS DWARF 2 extensions */
+  { NULL,      NULL }, /* .debug_funcnames */
+  { NULL,      NULL }, /* .debug_typenames */
+  { NULL,      NULL }, /* .debug_varnames */
+  { NULL,      NULL }, /* .debug_weaknames */
+  { NULL,      NULL },
+};
+
+static bfd_boolean
+xcoff_find_nearest_line (bfd *abfd,
+                         asection *section,
+                         asymbol **symbols,
+                         bfd_vma offset,
+                         const char **filename_ptr,
+                         const char **functionname_ptr,
+                         unsigned int *line_ptr)
+{
+  return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections,
+                                            section, symbols, offset,
+                                            filename_ptr, functionname_ptr,
+                                            line_ptr);
+}
+
 \f
 void
 _bfd_xcoff_swap_sym_in (bfd *abfd, PTR ext1, PTR in1)
@@ -3862,6 +3906,18 @@ static unsigned long xcoff_glink_code[9] =
     0x00000000,        /* traceback table */
   };
 
+/* Table to convert DWARF flags to section names.  */
+
+const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
+  { SSUBTYP_DWINFO,  ".dwinfo",   TRUE },
+  { SSUBTYP_DWLINE,  ".dwline",   TRUE },
+  { SSUBTYP_DWPBNMS, ".dwpbnms",  TRUE },
+  { SSUBTYP_DWPBTYP, ".dwpbtyp",  TRUE },
+  { SSUBTYP_DWARNGE, ".dwarnge",  TRUE },
+  { SSUBTYP_DWABREV, ".dwabrev",  FALSE },
+  { SSUBTYP_DWSTR,   ".dwstr",    TRUE },
+  { SSUBTYP_DWRNGES, ".dwrnges",  TRUE }
+};
 
 static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
   {
@@ -3974,6 +4030,7 @@ const bfd_target rs6000coff_vec =
     0,                         /* leading char */
     '/',                       /* ar_pad_char */
     15,                                /* ar_max_namelen */
+    0,                         /* match priority.  */
 
     /* data */
     bfd_getb64,
@@ -4060,7 +4117,7 @@ const bfd_target rs6000coff_vec =
     _bfd_xcoff_is_local_label_name,
     coff_bfd_is_target_special_symbol,
     coff_get_lineno,
-    coff_find_nearest_line,
+    xcoff_find_nearest_line,
     _bfd_generic_find_line,
     coff_find_inliner_info,
     coff_bfd_make_debug_symbol,
@@ -4089,6 +4146,7 @@ const bfd_target rs6000coff_vec =
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
     bfd_generic_gc_sections,
+    bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
@@ -4227,6 +4285,7 @@ const bfd_target pmac_xcoff_vec =
     0,                         /* leading char */
     '/',                       /* ar_pad_char */
     15,                                /* ar_max_namelen */
+    0,                         /* match priority.  */
 
     /* data */
     bfd_getb64,
@@ -4313,7 +4372,7 @@ const bfd_target pmac_xcoff_vec =
     _bfd_xcoff_is_local_label_name,
     coff_bfd_is_target_special_symbol,
     coff_get_lineno,
-    coff_find_nearest_line,
+    xcoff_find_nearest_line,
     _bfd_generic_find_line,
     coff_find_inliner_info,
     coff_bfd_make_debug_symbol,
@@ -4342,6 +4401,7 @@ const bfd_target pmac_xcoff_vec =
     _bfd_xcoff_bfd_final_link,
     _bfd_generic_link_split_section,
     bfd_generic_gc_sections,
+    bfd_generic_lookup_section_flags,
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
This page took 0.024883 seconds and 4 git commands to generate.