If we fail to merge a secondary GOT with the primary GOT but so far only one merged GOT has been created (the primary one), the final element in MergedGots is the primary GOT. Thus we should not try to merge with this final element passing IsPrimary=false, since this will ignore the fact that the destination GOT does in fact need a header, and those extra two entries can be enough to allow the merge to incorrectly occur. Instead we should check for this case before attempting the second merge. Patch by James Clarke. Differential revision: https://reviews.llvm.org/D49422 llvm-svn: 337810
9 lines
87 B
ArmAsm
9 lines
87 B
ArmAsm
.text
|
|
.global foo1
|
|
foo1:
|
|
ld $2, %got_disp(local1)($gp)
|
|
|
|
.bss
|
|
local1:
|
|
.word 0
|