or1k.patch 906 B

1234567891011121314151617
  1. diff -Nur binutils-2.32.orig/bfd/elf32-or1k.c binutils-2.32/bfd/elf32-or1k.c
  2. --- binutils-2.32.orig/bfd/elf32-or1k.c 2019-01-19 17:01:33.000000000 +0100
  3. +++ binutils-2.32/bfd/elf32-or1k.c 2019-10-06 04:55:05.439891597 +0200
  4. @@ -2379,8 +2379,11 @@
  5. or1k_write_plt_entry (output_bfd, splt->contents + h->plt.offset,
  6. plt0, plt1, plt2, OR1K_JR(12));
  7. - /* Fill in the entry in the global offset table. */
  8. - bfd_put_32 (output_bfd, plt_addr, sgot->contents + got_offset);
  9. + /* Fill in the entry in the global offset table. We initialize it to
  10. + point to the top of the plt. This is done to lazy lookup the actual
  11. + symbol as the first plt entry will be setup by libc to call the
  12. + runtime dynamic linker. */
  13. + bfd_put_32 (output_bfd, plt_base_addr, sgot->contents + got_offset);
  14. /* Fill in the entry in the .rela.plt section. */
  15. rela.r_offset = got_addr;