Warn relocation in readonly section in a shared object.
[binutils-gdb.git] / bfd / elf32-microblaze.c
index e260c5557758351bfb8e8663a792388153a9e6a8..2d460ab9a7a07d556d5fa80cae4c62fb24ce0bd8 100644 (file)
@@ -1,6 +1,6 @@
 /* Xilinx MicroBlaze-specific support for 32-bit ELF
 
-   Copyright 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -824,7 +824,7 @@ microblaze_elf_relocate_section (bfd *output_bfd,
            }
 
          /* Sanity check the address.  */
-         if (offset > bfd_get_section_limit (output_bfd, input_section))
+         if (offset > bfd_get_section_limit (input_bfd, input_section))
            {
              r = bfd_reloc_outofrange;
              goto check_reloc;
@@ -2060,7 +2060,7 @@ microblaze_elf_check_relocs (bfd * abfd,
                    const char *name;
                    bfd *dynobj;
                    unsigned int strndx = elf_elfheader (abfd)->e_shstrndx;
-                   unsigned int shnam = elf_section_data (sec)->rel_hdr.sh_name;
+                   unsigned int shnam = _bfd_elf_single_rel_hdr (sec)->sh_name;
 
                    name = bfd_elf_string_from_elf_section (abfd, strndx, shnam);
                    if (name == NULL)