* elf-m10300.c (mn10300_elf_check_relocs): Delete dead code.
[deliverable/binutils-gdb.git] / bfd / libbfd.c
index 3b27e08a8f3ac0f01bb885255619590a9b1ab1db..bf49a2e1db14671145790ef88433016f394f28df 100644 (file)
@@ -1,6 +1,6 @@
 /* Assorted BFD support routines, only used internally.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005
+   2000, 2001, 2002, 2003, 2004, 2005, 2007
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -8,7 +8,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
-#include "bfd.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "libbfd.h"
 
 #ifndef HAVE_GETPAGESIZE
@@ -103,6 +104,23 @@ bfd_void (bfd *ignore ATTRIBUTE_UNUSED)
 {
 }
 
+long
+_bfd_norelocs_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED,
+                                    asection *sec ATTRIBUTE_UNUSED)
+{
+  return sizeof (arelent *);
+}
+
+long
+_bfd_norelocs_canonicalize_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+                                 asection *sec ATTRIBUTE_UNUSED,
+                                 arelent **relptr,
+                                 asymbol **symbols ATTRIBUTE_UNUSED)
+{
+  *relptr = NULL;
+  return 0;
+}
+
 bfd_boolean
 _bfd_nocore_core_file_matches_executable_p
   (bfd *ignore_core_bfd ATTRIBUTE_UNUSED,
@@ -802,7 +820,8 @@ _bfd_generic_get_section_contents (bfd *abfd,
     return TRUE;
 
   sz = section->rawsize ? section->rawsize : section->size;
-  if (offset + count > sz)
+  if (offset + count < count
+      || offset + count > sz)
     {
       bfd_set_error (bfd_error_invalid_operation);
       return FALSE;
@@ -1035,10 +1054,11 @@ _bfd_generic_find_line (bfd *abfd ATTRIBUTE_UNUSED,
 }
 
 bfd_boolean
-_bfd_generic_match_sections_by_type (bfd *abfd ATTRIBUTE_UNUSED,
-                                    const asection *asec ATTRIBUTE_UNUSED,
-                                    bfd *bbfd ATTRIBUTE_UNUSED,
-                                    const asection *bsec ATTRIBUTE_UNUSED)
+_bfd_generic_init_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED,
+                                       asection *isec ATTRIBUTE_UNUSED,
+                                       bfd *obfd ATTRIBUTE_UNUSED,
+                                       asection *osec ATTRIBUTE_UNUSED,
+                                       struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
This page took 0.024063 seconds and 4 git commands to generate.