https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If you read the tls.pdf, you'll see that it is not really possible, the IE -> LE transition needs to change the instructions that read from the .got memory to instructions that set the destination to an immediate. I think it can deal currently with: subl foo@{tpoff,gotntpoff}(%reg1), %reg2 movl foo@{tpoff,gotntpoff}(%reg1), %reg2 addl foo@{tpoff,gotntpoff}(%reg1), %reg2 and is tranformed into movl immediate, %reg2. There is no instruction that would set a mask register to an immediate (except for some special cases like 0).