Commit cc63893
committed
[IRGen] Don't use GOTPCREL relocations for x86 ELF.
Unforunately, x86 ELF linkers like to optimize GOTPCREL relocations by
replacing `mov` instructions that go via the GOT with `lea` instructions
that do not.
That would be fine, but they aren't very selective and will happily
perform this transformation in non-code sections if they think that
the bytes before a relocation look like a `mov` instruction.
This corrupts our metadata.
rdar://1481680981 parent 6b3e2cd commit cc63893
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3736 | 3736 | | |
3737 | 3737 | | |
3738 | 3738 | | |
3739 | | - | |
| 3739 | + | |
3740 | 3740 | | |
3741 | 3741 | | |
3742 | 3742 | | |
3743 | 3743 | | |
| 3744 | + | |
3744 | 3745 | | |
3745 | | - | |
| 3746 | + | |
| 3747 | + | |
3746 | 3748 | | |
3747 | 3749 | | |
3748 | 3750 | | |
| |||
0 commit comments