[PATCH] D31528: [ELF][MIPS] Multi-GOT implementation

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 14 07:26:24 PST 2018


arichardson added a comment.

As this patch is essential for being able to link any of our code I did some bisection and it turns out that the tests start failing after https://reviews.llvm.org/rL320472 (https://reviews.llvm.org/D38361).

It is not obvious to me why that commit would break the multigot implementation but here are my findings so far:

Before that commit the mips .got section is 112 bytes (good) for the `mips-mgot.s` test and afterwards it's only 108 bytes (bad). It also makes `rela.dyn` go from 184 (good) bytes to 96 bytes (bad).

Passing test case before  https://reviews.llvm.org/rL320472:

  Contents of section .got:
   60000 00000000 80000000 00010000 00010030  ...............0
   60010 00020000 00030000 00040000 00050000  ................
   60020 00060000 00070000 00000000 00000000  ................
   60030 00000004 00000000 00000000 00000000  ................
   60040 00000000 00020000 00030000 00040000  ................
   60050 00050000 00060000 00070000 00000000  ................
   60060 00000000 00000000 00000000 00000000  ................

Broken GOT afterwards:

  Contents of section .got:
   60000 00000000 80000000 00020000 00030000  ................
   60010 00010000 00010030 00000000 00000004  .......0........
   60020 00000000 00000000 00000000 00000000  ................
   60030 00020000 00030000 00040000 00050000  ................
   60040 00000000 00070000 00000000 00000000  ................
   60050 00000000 00000000 00000000 00000000  ................
   60060 00000000 00000000 00000000           ............


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D31528





More information about the llvm-commits mailing list