OSDN Git Service

bfd/
[pf3gnuchains/pf3gnuchains4x.git] / bfd / elf32-m32c.c
index a706ac3..cf7ad99 100644 (file)
@@ -1,5 +1,5 @@
 /* M16C/M32C specific support for 32-bit ELF.
-   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -435,15 +435,8 @@ m32c_elf_relocate_section
        }
 
       if (sec != NULL && elf_discarded_section (sec))
-       {
-         /* For relocs against symbols from removed linkonce sections,
-            or sections discarded by a linker script, we just want the
-            section contents zeroed.  Avoid any special processing.  */
-         _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
-         rel->r_info = 0;
-         rel->r_addend = 0;
-         continue;
-       }
+       RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+                                        rel, relend, howto, contents);
 
       if (info->relocatable)
        {
@@ -996,9 +989,6 @@ m32c_relax_plt_check (struct elf_link_hash_entry *h,
 {
   struct relax_plt_data *data = (struct relax_plt_data *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       bfd_vma address;
@@ -1031,9 +1021,6 @@ m32c_relax_plt_realloc (struct elf_link_hash_entry *h,
 {
   bfd_vma *entry = (bfd_vma *) xdata;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   if (h->plt.offset != (bfd_vma) -1)
     {
       h->plt.offset = *entry;
@@ -2010,7 +1997,7 @@ _bfd_m32c_elf_eh_frame_address_size (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
 #define ELF_ARCH               bfd_arch_m32c
 #define ELF_MACHINE_CODE       EM_M32C
 #define ELF_MACHINE_ALT1       EM_M32C_OLD
-#define ELF_MAXPAGESIZE                0x1000
+#define ELF_MAXPAGESIZE                0x100
 
 #if 0
 #define TARGET_BIG_SYM         bfd_elf32_m32c_vec