X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-m32r.c;h=6a4fd1834e7c9d7650e09ddb0c35927171222a68;hb=32866df75ece22ec1fd88e99e3c5effe9238e072;hp=c0794dc12797f299502512c78906a3b2a649f065;hpb=157090f728a99fff42b3d3cc576b0c2a953e9916;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index c0794dc127..6a4fd1834e 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -6,7 +6,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, @@ -16,10 +16,11 @@ 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" #include "elf-bfd.h" #include "elf/m32r.h" @@ -1833,7 +1834,6 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_m32r_dyn_relocs *p; bfd *dynobj; asection *s; - unsigned int power_of_two; #ifdef DEBUG_PIC printf ("m32r_elf_adjust_dynamic_symbol()\n"); @@ -1961,28 +1961,7 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_copy = 1; } - /* We need to figure out the alignment required for this symbol. I - have no idea how ELF linkers handle this. */ - power_of_two = bfd_log2 (h->size); - if (power_of_two > 3) - power_of_two = 3; - - /* Apply the required alignment. */ - s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two)); - if (power_of_two > bfd_get_section_alignment (dynobj, s)) - { - if (! bfd_set_section_alignment (dynobj, s, power_of_two)) - return FALSE; - } - - /* Define the symbol as being at this point in the section. */ - h->root.u.def.section = s; - h->root.u.def.value = s->size; - - /* Increment the section size to make room for the symbol. */ - s->size += h->size; - - return TRUE; + return _bfd_elf_adjust_dynamic_copy (h, s); } /* Allocate space in .plt, .got and associated reloc sections for