bfd/elfnn-aarch64.c: Fix miscalculation of GOTPLT offset for ifunc syms.
[deliverable/binutils-gdb.git] / bfd / elfnn-aarch64.c
index 48fa3d2974409a0fa9e08e1cf4a6103f9bdf5d02..7cce6f449a2d1ac91e4889edeee9236570128756 100644 (file)
@@ -3589,7 +3589,8 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
 
              if (globals->root.splt != NULL)
                {
-                 plt_index = h->plt.offset / globals->plt_entry_size - 1;
+                 plt_index = ((h->plt.offset - globals->plt_header_size) /
+                              globals->plt_entry_size);
                  off = (plt_index + 3) * GOT_ENTRY_SIZE;
                  base_got = globals->root.sgotplt;
                }
This page took 0.028894 seconds and 4 git commands to generate.