daily update
[deliverable/binutils-gdb.git] / bfd / elf-hppa.h
index 1b16ac47ab778903b86d9a94feffb036f45a1a6e..c4ad5ad712e184979e327418e88fa1e42b693711 100644 (file)
@@ -1,5 +1,5 @@
 /* Common code for PA ELF implementations.
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -1057,6 +1057,18 @@ static bfd_boolean elf_hppa_sort_unwind (bfd *abfd)
   return TRUE;
 }
 
+/* What to do when ld finds relocations against symbols defined in
+   discarded sections.  */
+
+static unsigned int
+elf_hppa_action_discarded (asection *sec)
+{
+  if (strcmp (".PARISC.unwind", sec->name) == 0)
+    return 0;
+
+  return _bfd_elf_default_action_discarded (sec);
+}
+
 #if ARCH_SIZE == 64
 /* Hook called by the linker routine which adds symbols from an object
    file.  HP's libraries define symbols with HP specific section
@@ -1259,9 +1271,9 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
              if (!sec || (sec->flags & SEC_EXCLUDE))
                sec = bfd_get_section_by_name (abfd, ".data");
              if (!sec || (sec->flags & SEC_EXCLUDE))
-               return FALSE;
-
-             gp_val = sec->output_offset + sec->output_section->vma;
+               gp_val = 0;
+             else
+               gp_val = sec->output_offset + sec->output_section->vma;
            }
        }
 
@@ -1398,8 +1410,12 @@ elf_hppa_relocate_section (bfd *output_bfd,
              if (sym_sec->output_section == NULL && dyn_h == NULL)
                {
                  (*_bfd_error_handler)
-                   (_("%B(%A): warning: unresolvable relocation against symbol `%s'"),
-                    input_bfd, input_section, h->root.root.string);
+                   (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+                    input_bfd,
+                    input_section,
+                    (long) rel->r_offset,
+                    howto->name,
+                    h->root.root.string);
                  relocation = 0;
                }
              else if (sym_sec->output_section)
This page took 0.023437 seconds and 4 git commands to generate.