X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bfd%2Felf32-or1k.c;h=0d1336ceaccdc2a861c9bbb45b20c0931df0e0d2;hb=refs%2Fheads%2Fsandbox%2Fvbarinov%2Ftizen_6_base;hp=2f200b197b8a2d142b40785c5f4d09225c62042e;hpb=827041555ac443bd57340060f3e034fd7b199dd8;p=external%2Fbinutils.git diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index 2f200b1..0d1336c 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -1927,9 +1927,7 @@ or1k_elf_check_relocs (bfd *abfd, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_OR1K_GNU_VTENTRY: - BFD_ASSERT (h != NULL); - if (h != NULL - && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) return FALSE; break; @@ -2379,8 +2377,11 @@ or1k_elf_finish_dynamic_symbol (bfd *output_bfd, or1k_write_plt_entry (output_bfd, splt->contents + h->plt.offset, plt0, plt1, plt2, OR1K_JR(12)); - /* Fill in the entry in the global offset table. */ - bfd_put_32 (output_bfd, plt_addr, sgot->contents + got_offset); + /* Fill in the entry in the global offset table. We initialize it to + point to the top of the plt. This is done to lazy lookup the actual + symbol as the first plt entry will be setup by libc to call the + runtime dynamic linker. */ + bfd_put_32 (output_bfd, plt_base_addr, sgot->contents + got_offset); /* Fill in the entry in the .rela.plt section. */ rela.r_offset = got_addr; @@ -3158,9 +3159,8 @@ or1k_elf_object_p (bfd *abfd) /* Store the machine number in the flags field. */ -static void -or1k_elf_final_write_processing (bfd *abfd, - bfd_boolean linker ATTRIBUTE_UNUSED) +static bfd_boolean +or1k_elf_final_write_processing (bfd *abfd) { switch (bfd_get_mach (abfd)) { @@ -3171,6 +3171,7 @@ or1k_elf_final_write_processing (bfd *abfd, elf_elfheader (abfd)->e_flags |= EF_OR1K_NODELAY; break; } + return _bfd_elf_final_write_processing (abfd); } static bfd_boolean