| ... | ... | @@ -1628,6 +1628,12 @@ const aarch64 = struct { |
| 1628 | 1628 | if (is_dyn_lib) try atom.reportPicError(symbol, rel, elf_file); |
| 1629 | 1629 | }, |
| 1630 | 1630 | |
| 1631 | .TLSIE_ADR_GOTTPREL_PAGE21, |
| 1632 | .TLSIE_LD64_GOTTPREL_LO12_NC, |
| 1633 | => { |
| 1634 | symbol.flags.needs_gottp = true; |
| 1635 | }, |
| 1636 | |
| 1631 | 1637 | .TLSDESC_ADR_PAGE21, |
| 1632 | 1638 | .TLSDESC_LD64_LO12, |
| 1633 | 1639 | .TLSDESC_ADD_LO12, |
| ... | ... | @@ -1769,6 +1775,23 @@ const aarch64 = struct { |
| 1769 | 1775 | aarch64_util.writeAddImmInst(@bitCast(value), code); |
| 1770 | 1776 | }, |
| 1771 | 1777 | |
| 1778 | .TLSIE_ADR_GOTTPREL_PAGE21 => { |
| 1779 | const S_: i64 = @intCast(target.gotTpAddress(elf_file)); |
| 1780 | const saddr: u64 = @intCast(P); |
| 1781 | const taddr: u64 = @intCast(S_ + A); |
| 1782 | relocs_log.debug(" [{x} => {x}]", .{ P, taddr }); |
| 1783 | const pages: u21 = @bitCast(try aarch64_util.calcNumberOfPages(saddr, taddr)); |
| 1784 | aarch64_util.writeAdrpInst(pages, code); |
| 1785 | }, |
| 1786 | |
| 1787 | .TLSIE_LD64_GOTTPREL_LO12_NC => { |
| 1788 | const S_: i64 = @intCast(target.gotTpAddress(elf_file)); |
| 1789 | const taddr: u64 = @intCast(S_ + A); |
| 1790 | relocs_log.debug(" [{x} => {x}]", .{ P, taddr }); |
| 1791 | const offset: u12 = try math.divExact(u12, @truncate(taddr), 8); |
| 1792 | aarch64_util.writeLoadStoreRegInst(offset, code); |
| 1793 | }, |
| 1794 | |
| 1772 | 1795 | .TLSDESC_ADR_PAGE21 => { |
| 1773 | 1796 | if (target.flags.has_tlsdesc) { |
| 1774 | 1797 | const S_: i64 = @intCast(target.tlsDescAddress(elf_file)); |