* elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
[deliverable/binutils-gdb.git] / bfd / coff64-rs6000.c
index 41459b5c5a622e44bc7bca118df4c4be50b2b1c1..0e14b3499b8b96fe4f0c263e281df2a439dfe4a4 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for IBM RS/6000 "XCOFF64" files.
-   Copyright 2000, 2001, 2002, 2003, 2004
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    Written Clinton Popetz.
    Contributed by Cygnus Support.
@@ -564,7 +564,7 @@ _bfd_xcoff64_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
   if (ldinfo->string_size + len + 3 > ldinfo->string_alc)
     {
       bfd_size_type newalc;
-      bfd_byte *newstrings;
+      char *newstrings;
 
       newalc = ldinfo->string_alc * 2;
       if (newalc == 0)
@@ -572,8 +572,7 @@ _bfd_xcoff64_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
       while (ldinfo->string_size + len + 3 > newalc)
        newalc *= 2;
 
-      newstrings = ((bfd_byte *)
-                   bfd_realloc ((PTR) ldinfo->strings, newalc));
+      newstrings = bfd_realloc (ldinfo->strings, newalc);
       if (newstrings == NULL)
        {
          ldinfo->failed = TRUE;
@@ -845,11 +844,11 @@ xcoff64_write_object_contents (abfd)
 
       section.s_vaddr = current->vma;
       section.s_paddr = current->lma;
-      section.s_size =  current->_raw_size;
+      section.s_size =  current->size;
 
       /* If this section has no size or is unloadable then the scnptr
         will be 0 too.  */
-      if (current->_raw_size == 0
+      if (current->size == 0
          || (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
        {
          section.s_scnptr = 0;
@@ -965,19 +964,19 @@ xcoff64_write_object_contents (abfd)
 
   if (text_sec)
     {
-      internal_a.tsize = bfd_get_section_size (text_sec);
+      internal_a.tsize = text_sec->size;
       internal_a.text_start = internal_a.tsize ? text_sec->vma : 0;
     }
 
   if (data_sec)
     {
-      internal_a.dsize = bfd_get_section_size (data_sec);
+      internal_a.dsize = data_sec->size;
       internal_a.data_start = internal_a.dsize ? data_sec->vma : 0;
     }
 
   if (bss_sec)
     {
-      internal_a.bsize = bfd_get_section_size (bss_sec);
+      internal_a.bsize = bss_sec->size;
       if (internal_a.bsize && bss_sec->vma < internal_a.data_start)
        internal_a.data_start = bss_sec->vma;
     }
@@ -1127,8 +1126,7 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
      cror.  */
   if (NULL != h
       && bfd_link_hash_defined == h->root.type
-      && (rel->r_vaddr - input_section->vma + 8
-         <= input_section->_cooked_size))
+      && rel->r_vaddr - input_section->vma + 8 <= input_section->size)
     {
       bfd_byte *pnext;
       unsigned long next;
@@ -1301,7 +1299,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
       address = rel->r_vaddr - input_section->vma;
       location = contents + address;
 
-      if (address > input_section->_raw_size)
+      if (address > input_section->size)
        abort ();
 
       /* Get the value we are going to relocate.  */
@@ -1336,7 +1334,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
            }
          else if (h != NULL)
            {
-             name = h->root.root.string;
+             name = NULL;
            }
          else
            {
@@ -1347,8 +1345,9 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
          sprintf (reloc_type_name, "0x%02x", rel->r_type);
 
          if (! ((*info->callbacks->reloc_overflow)
-                (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
-                 input_section, rel->r_vaddr - input_section->vma)))
+                (info, (h ? &h->root : NULL), name, reloc_type_name,
+                 (bfd_vma) 0, input_bfd, input_section,
+                 rel->r_vaddr - input_section->vma)))
            return FALSE;
        }
 
@@ -2105,8 +2104,8 @@ xcoff64_create_csect_from_smclas (abfd, aux, symbol_name)
   else
     {
       (*_bfd_error_handler)
-       (_("%s: symbol `%s' has unrecognized smclas %d"),
-        bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+       (_("%B: symbol `%s' has unrecognized smclas %d"),
+        abfd, symbol_name, aux->x_csect.x_smclas);
       bfd_set_error (bfd_error_bad_value);
     }
 
@@ -2711,6 +2710,7 @@ const bfd_target rs6000coff64_vec =
     coff_print_symbol,
     coff_get_symbol_info,
     _bfd_xcoff_is_local_label_name,
+    coff_bfd_is_target_special_symbol,
     coff_get_lineno,
     coff_find_nearest_line,
     coff_bfd_make_debug_symbol,
@@ -2740,6 +2740,7 @@ const bfd_target rs6000coff64_vec =
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
+    _bfd_generic_section_already_linked,
 
     /* Dynamic */
     _bfd_xcoff_get_dynamic_symtab_upper_bound,
@@ -2957,6 +2958,7 @@ const bfd_target aix5coff64_vec =
     coff_print_symbol,
     coff_get_symbol_info,
     _bfd_xcoff_is_local_label_name,
+    coff_bfd_is_target_special_symbol,
     coff_get_lineno,
     coff_find_nearest_line,
     coff_bfd_make_debug_symbol,
@@ -2986,6 +2988,7 @@ const bfd_target aix5coff64_vec =
     bfd_generic_merge_sections,
     bfd_generic_is_group_section,
     bfd_generic_discard_group,
+    _bfd_generic_section_already_linked,
 
     /* Dynamic */
     _bfd_xcoff_get_dynamic_symtab_upper_bound,
This page took 0.025388 seconds and 4 git commands to generate.