authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-02-17 08:50:53+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-02-17 08:50:53+01:00
log5122a3d2d9fc3f7a06eb2de56ea65e9ec99d9af8
treed0ac4f62336802ddfd739cbd93a42f7d0d572cb1
parent70a5dca13eb19199124a5f1dc5e19fc059906238

lib/std/elf: use enums for relocs


1 files changed, 416 insertions(+), 413 deletions(-)

lib/std/elf.zig+416-413
......@@ -1806,423 +1806,426 @@ pub const COMPRESS = enum(u32) {
18061806};
18071807
18081808/// AMD x86-64 relocations.
1809/// No reloc
1810pub const R_X86_64_NONE = 0;
1811/// Direct 64 bit
1812pub const R_X86_64_64 = 1;
1813/// PC relative 32 bit signed
1814pub const R_X86_64_PC32 = 2;
1815/// 32 bit GOT entry
1816pub const R_X86_64_GOT32 = 3;
1817/// 32 bit PLT address
1818pub const R_X86_64_PLT32 = 4;
1819/// Copy symbol at runtime
1820pub const R_X86_64_COPY = 5;
1821/// Create GOT entry
1822pub const R_X86_64_GLOB_DAT = 6;
1823/// Create PLT entry
1824pub const R_X86_64_JUMP_SLOT = 7;
1825/// Adjust by program base
1826pub const R_X86_64_RELATIVE = 8;
1827/// 32 bit signed PC relative offset to GOT
1828pub const R_X86_64_GOTPCREL = 9;
1829/// Direct 32 bit zero extended
1830pub const R_X86_64_32 = 10;
1831/// Direct 32 bit sign extended
1832pub const R_X86_64_32S = 11;
1833/// Direct 16 bit zero extended
1834pub const R_X86_64_16 = 12;
1835/// 16 bit sign extended pc relative
1836pub const R_X86_64_PC16 = 13;
1837/// Direct 8 bit sign extended
1838pub const R_X86_64_8 = 14;
1839/// 8 bit sign extended pc relative
1840pub const R_X86_64_PC8 = 15;
1841/// ID of module containing symbol
1842pub const R_X86_64_DTPMOD64 = 16;
1843/// Offset in module's TLS block
1844pub const R_X86_64_DTPOFF64 = 17;
1845/// Offset in initial TLS block
1846pub const R_X86_64_TPOFF64 = 18;
1847/// 32 bit signed PC relative offset to two GOT entries for GD symbol
1848pub const R_X86_64_TLSGD = 19;
1849/// 32 bit signed PC relative offset to two GOT entries for LD symbol
1850pub const R_X86_64_TLSLD = 20;
1851/// Offset in TLS block
1852pub const R_X86_64_DTPOFF32 = 21;
1853/// 32 bit signed PC relative offset to GOT entry for IE symbol
1854pub const R_X86_64_GOTTPOFF = 22;
1855/// Offset in initial TLS block
1856pub const R_X86_64_TPOFF32 = 23;
1857/// PC relative 64 bit
1858pub const R_X86_64_PC64 = 24;
1859/// 64 bit offset to GOT
1860pub const R_X86_64_GOTOFF64 = 25;
1861/// 32 bit signed pc relative offset to GOT
1862pub const R_X86_64_GOTPC32 = 26;
1863/// 64 bit GOT entry offset
1864pub const R_X86_64_GOT64 = 27;
1865/// 64 bit PC relative offset to GOT entry
1866pub const R_X86_64_GOTPCREL64 = 28;
1867/// 64 bit PC relative offset to GOT
1868pub const R_X86_64_GOTPC64 = 29;
1869/// Like GOT64, says PLT entry needed
1870pub const R_X86_64_GOTPLT64 = 30;
1871/// 64-bit GOT relative offset to PLT entry
1872pub const R_X86_64_PLTOFF64 = 31;
1873/// Size of symbol plus 32-bit addend
1874pub const R_X86_64_SIZE32 = 32;
1875/// Size of symbol plus 64-bit addend
1876pub const R_X86_64_SIZE64 = 33;
1877/// GOT offset for TLS descriptor
1878pub const R_X86_64_GOTPC32_TLSDESC = 34;
1879/// Marker for call through TLS descriptor
1880pub const R_X86_64_TLSDESC_CALL = 35;
1881/// TLS descriptor
1882pub const R_X86_64_TLSDESC = 36;
1883/// Adjust indirectly by program base
1884pub const R_X86_64_IRELATIVE = 37;
1885/// 64-bit adjust by program base
1886pub const R_X86_64_RELATIVE64 = 38;
1887/// 39 Reserved was R_X86_64_PC32_BND
1888/// 40 Reserved was R_X86_64_PLT32_BND
1889/// Load from 32 bit signed pc relative offset to GOT entry without REX prefix, relaxable
1890pub const R_X86_64_GOTPCRELX = 41;
1891/// Load from 32 bit signed PC relative offset to GOT entry with REX prefix, relaxable
1892pub const R_X86_64_REX_GOTPCRELX = 42;
1893pub const R_X86_64_NUM = 43;
1809pub const R_X86_64 = enum(u32) {
1810 /// No reloc
1811 R_X86_64_NONE = 0,
1812 /// Direct 64 bit
1813 R_X86_64_64 = 1,
1814 /// PC relative 32 bit signed
1815 R_X86_64_PC32 = 2,
1816 /// 32 bit GOT entry
1817 R_X86_64_GOT32 = 3,
1818 /// 32 bit PLT address
1819 R_X86_64_PLT32 = 4,
1820 /// Copy symbol at runtime
1821 R_X86_64_COPY = 5,
1822 /// Create GOT entry
1823 R_X86_64_GLOB_DAT = 6,
1824 /// Create PLT entry
1825 R_X86_64_JUMP_SLOT = 7,
1826 /// Adjust by program base
1827 R_X86_64_RELATIVE = 8,
1828 /// 32 bit signed PC relative offset to GOT
1829 R_X86_64_GOTPCREL = 9,
1830 /// Direct 32 bit zero extended
1831 R_X86_64_32 = 10,
1832 /// Direct 32 bit sign extended
1833 R_X86_64_32S = 11,
1834 /// Direct 16 bit zero extended
1835 R_X86_64_16 = 12,
1836 /// 16 bit sign extended pc relative
1837 R_X86_64_PC16 = 13,
1838 /// Direct 8 bit sign extended
1839 R_X86_64_8 = 14,
1840 /// 8 bit sign extended pc relative
1841 R_X86_64_PC8 = 15,
1842 /// ID of module containing symbol
1843 R_X86_64_DTPMOD64 = 16,
1844 /// Offset in module's TLS block
1845 R_X86_64_DTPOFF64 = 17,
1846 /// Offset in initial TLS block
1847 R_X86_64_TPOFF64 = 18,
1848 /// 32 bit signed PC relative offset to two GOT entries for GD symbol
1849 R_X86_64_TLSGD = 19,
1850 /// 32 bit signed PC relative offset to two GOT entries for LD symbol
1851 R_X86_64_TLSLD = 20,
1852 /// Offset in TLS block
1853 R_X86_64_DTPOFF32 = 21,
1854 /// 32 bit signed PC relative offset to GOT entry for IE symbol
1855 R_X86_64_GOTTPOFF = 22,
1856 /// Offset in initial TLS block
1857 R_X86_64_TPOFF32 = 23,
1858 /// PC relative 64 bit
1859 R_X86_64_PC64 = 24,
1860 /// 64 bit offset to GOT
1861 R_X86_64_GOTOFF64 = 25,
1862 /// 32 bit signed pc relative offset to GOT
1863 R_X86_64_GOTPC32 = 26,
1864 /// 64 bit GOT entry offset
1865 R_X86_64_GOT64 = 27,
1866 /// 64 bit PC relative offset to GOT entry
1867 R_X86_64_GOTPCREL64 = 28,
1868 /// 64 bit PC relative offset to GOT
1869 R_X86_64_GOTPC64 = 29,
1870 /// Like GOT64, says PLT entry needed
1871 R_X86_64_GOTPLT64 = 30,
1872 /// 64-bit GOT relative offset to PLT entry
1873 R_X86_64_PLTOFF64 = 31,
1874 /// Size of symbol plus 32-bit addend
1875 R_X86_64_SIZE32 = 32,
1876 /// Size of symbol plus 64-bit addend
1877 R_X86_64_SIZE64 = 33,
1878 /// GOT offset for TLS descriptor
1879 R_X86_64_GOTPC32_TLSDESC = 34,
1880 /// Marker for call through TLS descriptor
1881 R_X86_64_TLSDESC_CALL = 35,
1882 /// TLS descriptor
1883 R_X86_64_TLSDESC = 36,
1884 /// Adjust indirectly by program base
1885 R_X86_64_IRELATIVE = 37,
1886 /// 64-bit adjust by program base
1887 R_X86_64_RELATIVE64 = 38,
1888 /// 39 Reserved was R_X86_64_PC32_BND
1889 /// 40 Reserved was R_X86_64_PLT32_BND
1890 /// Load from 32 bit signed pc relative offset to GOT entry without REX prefix, relaxable
1891 R_X86_64_GOTPCRELX = 41,
1892 /// Load from 32 bit signed PC relative offset to GOT entry with REX prefix, relaxable
1893 R_X86_64_REX_GOTPCRELX = 42,
1894};
18941895
18951896/// AArch64 relocs.
1896/// No relocation.
1897pub const R_AARCH64_NONE = 0;
1898
1899/// ILP32 AArch64 relocs.
1900/// Direct 32 bit.
1901pub const R_AARCH64_P32_ABS32 = 1;
1902/// Copy symbol at runtime.
1903pub const R_AARCH64_P32_COPY = 180;
1904/// Create GOT entry.
1905pub const R_AARCH64_P32_GLOB_DAT = 181;
1906/// Create PLT entry.
1907pub const R_AARCH64_P32_JUMP_SLOT = 182;
1908/// Adjust by program base.
1909pub const R_AARCH64_P32_RELATIVE = 183;
1910/// Module number, 32 bit.
1911pub const R_AARCH64_P32_TLS_DTPMOD = 184;
1912/// Module-relative offset, 32 bit.
1913pub const R_AARCH64_P32_TLS_DTPREL = 185;
1914/// TP-relative offset, 32 bit.
1915pub const R_AARCH64_P32_TLS_TPREL = 186;
1916/// TLS Descriptor.
1917pub const R_AARCH64_P32_TLSDESC = 187;
1918/// STT_GNU_IFUNC relocation.
1919pub const R_AARCH64_P32_IRELATIVE = 188;
1920
1921/// LP64 AArch64 relocs.
1922/// Direct 64 bit.
1923pub const R_AARCH64_ABS64 = 257;
1924/// Direct 32 bit.
1925pub const R_AARCH64_ABS32 = 258;
1926/// Direct 16-bit.
1927pub const R_AARCH64_ABS16 = 259;
1928/// PC-relative 64-bit.
1929pub const R_AARCH64_PREL64 = 260;
1930/// PC-relative 32-bit.
1931pub const R_AARCH64_PREL32 = 261;
1932/// PC-relative 16-bit.
1933pub const R_AARCH64_PREL16 = 262;
1934/// Dir. MOVZ imm. from bits 15:0.
1935pub const R_AARCH64_MOVW_UABS_G0 = 263;
1936/// Likewise for MOVK; no check.
1937pub const R_AARCH64_MOVW_UABS_G0_NC = 264;
1938/// Dir. MOVZ imm. from bits 31:16.
1939pub const R_AARCH64_MOVW_UABS_G1 = 265;
1940/// Likewise for MOVK; no check.
1941pub const R_AARCH64_MOVW_UABS_G1_NC = 266;
1942/// Dir. MOVZ imm. from bits 47:32.
1943pub const R_AARCH64_MOVW_UABS_G2 = 267;
1944/// Likewise for MOVK; no check.
1945pub const R_AARCH64_MOVW_UABS_G2_NC = 268;
1946/// Dir. MOV{K,Z} imm. from 63:48.
1947pub const R_AARCH64_MOVW_UABS_G3 = 269;
1948/// Dir. MOV{N,Z} imm. from 15:0.
1949pub const R_AARCH64_MOVW_SABS_G0 = 270;
1950/// Dir. MOV{N,Z} imm. from 31:16.
1951pub const R_AARCH64_MOVW_SABS_G1 = 271;
1952/// Dir. MOV{N,Z} imm. from 47:32.
1953pub const R_AARCH64_MOVW_SABS_G2 = 272;
1954/// PC-rel. LD imm. from bits 20:2.
1955pub const R_AARCH64_LD_PREL_LO19 = 273;
1956/// PC-rel. ADR imm. from bits 20:0.
1957pub const R_AARCH64_ADR_PREL_LO21 = 274;
1958/// Page-rel. ADRP imm. from 32:12.
1959pub const R_AARCH64_ADR_PREL_PG_HI21 = 275;
1960/// Likewise; no overflow check.
1961pub const R_AARCH64_ADR_PREL_PG_HI21_NC = 276;
1962/// Dir. ADD imm. from bits 11:0.
1963pub const R_AARCH64_ADD_ABS_LO12_NC = 277;
1964/// Likewise for LD/ST; no check.
1965pub const R_AARCH64_LDST8_ABS_LO12_NC = 278;
1966/// PC-rel. TBZ/TBNZ imm. from 15:2.
1967pub const R_AARCH64_TSTBR14 = 279;
1968/// PC-rel. cond. br. imm. from 20:2.
1969pub const R_AARCH64_CONDBR19 = 280;
1970/// PC-rel. B imm. from bits 27:2.
1971pub const R_AARCH64_JUMP26 = 282;
1972/// Likewise for CALL.
1973pub const R_AARCH64_CALL26 = 283;
1974/// Dir. ADD imm. from bits 11:1.
1975pub const R_AARCH64_LDST16_ABS_LO12_NC = 284;
1976/// Likewise for bits 11:2.
1977pub const R_AARCH64_LDST32_ABS_LO12_NC = 285;
1978/// Likewise for bits 11:3.
1979pub const R_AARCH64_LDST64_ABS_LO12_NC = 286;
1980/// PC-rel. MOV{N,Z} imm. from 15:0.
1981pub const R_AARCH64_MOVW_PREL_G0 = 287;
1982/// Likewise for MOVK; no check.
1983pub const R_AARCH64_MOVW_PREL_G0_NC = 288;
1984/// PC-rel. MOV{N,Z} imm. from 31:16.
1985pub const R_AARCH64_MOVW_PREL_G1 = 289;
1986/// Likewise for MOVK; no check.
1987pub const R_AARCH64_MOVW_PREL_G1_NC = 290;
1988/// PC-rel. MOV{N,Z} imm. from 47:32.
1989pub const R_AARCH64_MOVW_PREL_G2 = 291;
1990/// Likewise for MOVK; no check.
1991pub const R_AARCH64_MOVW_PREL_G2_NC = 292;
1992/// PC-rel. MOV{N,Z} imm. from 63:48.
1993pub const R_AARCH64_MOVW_PREL_G3 = 293;
1994/// Dir. ADD imm. from bits 11:4.
1995pub const R_AARCH64_LDST128_ABS_LO12_NC = 299;
1996/// GOT-rel. off. MOV{N,Z} imm. 15:0.
1997pub const R_AARCH64_MOVW_GOTOFF_G0 = 300;
1998/// Likewise for MOVK; no check.
1999pub const R_AARCH64_MOVW_GOTOFF_G0_NC = 301;
2000/// GOT-rel. o. MOV{N,Z} imm. 31:16.
2001pub const R_AARCH64_MOVW_GOTOFF_G1 = 302;
2002/// Likewise for MOVK; no check.
2003pub const R_AARCH64_MOVW_GOTOFF_G1_NC = 303;
2004/// GOT-rel. o. MOV{N,Z} imm. 47:32.
2005pub const R_AARCH64_MOVW_GOTOFF_G2 = 304;
2006/// Likewise for MOVK; no check.
2007pub const R_AARCH64_MOVW_GOTOFF_G2_NC = 305;
2008/// GOT-rel. o. MOV{N,Z} imm. 63:48.
2009pub const R_AARCH64_MOVW_GOTOFF_G3 = 306;
2010/// GOT-relative 64-bit.
2011pub const R_AARCH64_GOTREL64 = 307;
2012/// GOT-relative 32-bit.
2013pub const R_AARCH64_GOTREL32 = 308;
2014/// PC-rel. GOT off. load imm. 20:2.
2015pub const R_AARCH64_GOT_LD_PREL19 = 309;
2016/// GOT-rel. off. LD/ST imm. 14:3.
2017pub const R_AARCH64_LD64_GOTOFF_LO15 = 310;
2018/// P-page-rel. GOT off. ADRP 32:12.
2019pub const R_AARCH64_ADR_GOT_PAGE = 311;
2020/// Dir. GOT off. LD/ST imm. 11:3.
2021pub const R_AARCH64_LD64_GOT_LO12_NC = 312;
2022/// GOT-page-rel. GOT off. LD/ST 14:3
2023pub const R_AARCH64_LD64_GOTPAGE_LO15 = 313;
2024/// PC-relative ADR imm. 20:0.
2025pub const R_AARCH64_TLSGD_ADR_PREL21 = 512;
2026/// page-rel. ADRP imm. 32:12.
2027pub const R_AARCH64_TLSGD_ADR_PAGE21 = 513;
2028/// direct ADD imm. from 11:0.
2029pub const R_AARCH64_TLSGD_ADD_LO12_NC = 514;
2030/// GOT-rel. MOV{N,Z} 31:16.
2031pub const R_AARCH64_TLSGD_MOVW_G1 = 515;
2032/// GOT-rel. MOVK imm. 15:0.
2033pub const R_AARCH64_TLSGD_MOVW_G0_NC = 516;
2034/// Like 512; local dynamic model.
2035pub const R_AARCH64_TLSLD_ADR_PREL21 = 517;
2036/// Like 513; local dynamic model.
2037pub const R_AARCH64_TLSLD_ADR_PAGE21 = 518;
2038/// Like 514; local dynamic model.
2039pub const R_AARCH64_TLSLD_ADD_LO12_NC = 519;
2040/// Like 515; local dynamic model.
2041pub const R_AARCH64_TLSLD_MOVW_G1 = 520;
2042/// Like 516; local dynamic model.
2043pub const R_AARCH64_TLSLD_MOVW_G0_NC = 521;
2044/// TLS PC-rel. load imm. 20:2.
2045pub const R_AARCH64_TLSLD_LD_PREL19 = 522;
2046/// TLS DTP-rel. MOV{N,Z} 47:32.
2047pub const R_AARCH64_TLSLD_MOVW_DTPREL_G2 = 523;
2048/// TLS DTP-rel. MOV{N,Z} 31:16.
2049pub const R_AARCH64_TLSLD_MOVW_DTPREL_G1 = 524;
2050/// Likewise; MOVK; no check.
2051pub const R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC = 525;
2052/// TLS DTP-rel. MOV{N,Z} 15:0.
2053pub const R_AARCH64_TLSLD_MOVW_DTPREL_G0 = 526;
2054/// Likewise; MOVK; no check.
2055pub const R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC = 527;
2056/// DTP-rel. ADD imm. from 23:12.
2057pub const R_AARCH64_TLSLD_ADD_DTPREL_HI12 = 528;
2058/// DTP-rel. ADD imm. from 11:0.
2059pub const R_AARCH64_TLSLD_ADD_DTPREL_LO12 = 529;
2060/// Likewise; no ovfl. check.
2061pub const R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC = 530;
2062/// DTP-rel. LD/ST imm. 11:0.
2063pub const R_AARCH64_TLSLD_LDST8_DTPREL_LO12 = 531;
2064/// Likewise; no check.
2065pub const R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = 532;
2066/// DTP-rel. LD/ST imm. 11:1.
2067pub const R_AARCH64_TLSLD_LDST16_DTPREL_LO12 = 533;
2068/// Likewise; no check.
2069pub const R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = 534;
2070/// DTP-rel. LD/ST imm. 11:2.
2071pub const R_AARCH64_TLSLD_LDST32_DTPREL_LO12 = 535;
2072/// Likewise; no check.
2073pub const R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = 536;
2074/// DTP-rel. LD/ST imm. 11:3.
2075pub const R_AARCH64_TLSLD_LDST64_DTPREL_LO12 = 537;
2076/// Likewise; no check.
2077pub const R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = 538;
2078/// GOT-rel. MOV{N,Z} 31:16.
2079pub const R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 539;
2080/// GOT-rel. MOVK 15:0.
2081pub const R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 540;
2082/// Page-rel. ADRP 32:12.
2083pub const R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 541;
2084/// Direct LD off. 11:3.
2085pub const R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 542;
2086/// PC-rel. load imm. 20:2.
2087pub const R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 543;
2088/// TLS TP-rel. MOV{N,Z} 47:32.
2089pub const R_AARCH64_TLSLE_MOVW_TPREL_G2 = 544;
2090/// TLS TP-rel. MOV{N,Z} 31:16.
2091pub const R_AARCH64_TLSLE_MOVW_TPREL_G1 = 545;
2092/// Likewise; MOVK; no check.
2093pub const R_AARCH64_TLSLE_MOVW_TPREL_G1_NC = 546;
2094/// TLS TP-rel. MOV{N,Z} 15:0.
2095pub const R_AARCH64_TLSLE_MOVW_TPREL_G0 = 547;
2096/// Likewise; MOVK; no check.
2097pub const R_AARCH64_TLSLE_MOVW_TPREL_G0_NC = 548;
2098/// TP-rel. ADD imm. 23:12.
2099pub const R_AARCH64_TLSLE_ADD_TPREL_HI12 = 549;
2100/// TP-rel. ADD imm. 11:0.
2101pub const R_AARCH64_TLSLE_ADD_TPREL_LO12 = 550;
2102/// Likewise; no ovfl. check.
2103pub const R_AARCH64_TLSLE_ADD_TPREL_LO12_NC = 551;
2104/// TP-rel. LD/ST off. 11:0.
2105pub const R_AARCH64_TLSLE_LDST8_TPREL_LO12 = 552;
2106/// Likewise; no ovfl. check.
2107pub const R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC = 553;
2108/// TP-rel. LD/ST off. 11:1.
2109pub const R_AARCH64_TLSLE_LDST16_TPREL_LO12 = 554;
2110/// Likewise; no check.
2111pub const R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC = 555;
2112/// TP-rel. LD/ST off. 11:2.
2113pub const R_AARCH64_TLSLE_LDST32_TPREL_LO12 = 556;
2114/// Likewise; no check.
2115pub const R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC = 557;
2116/// TP-rel. LD/ST off. 11:3.
2117pub const R_AARCH64_TLSLE_LDST64_TPREL_LO12 = 558;
2118/// Likewise; no check.
2119pub const R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC = 559;
2120/// PC-rel. load immediate 20:2.
2121pub const R_AARCH64_TLSDESC_LD_PREL19 = 560;
2122/// PC-rel. ADR immediate 20:0.
2123pub const R_AARCH64_TLSDESC_ADR_PREL21 = 561;
2124/// Page-rel. ADRP imm. 32:12.
2125pub const R_AARCH64_TLSDESC_ADR_PAGE21 = 562;
2126/// Direct LD off. from 11:3.
2127pub const R_AARCH64_TLSDESC_LD64_LO12 = 563;
2128/// Direct ADD imm. from 11:0.
2129pub const R_AARCH64_TLSDESC_ADD_LO12 = 564;
2130/// GOT-rel. MOV{N,Z} imm. 31:16.
2131pub const R_AARCH64_TLSDESC_OFF_G1 = 565;
2132/// GOT-rel. MOVK imm. 15:0; no ck.
2133pub const R_AARCH64_TLSDESC_OFF_G0_NC = 566;
2134/// Relax LDR.
2135pub const R_AARCH64_TLSDESC_LDR = 567;
2136/// Relax ADD.
2137pub const R_AARCH64_TLSDESC_ADD = 568;
2138/// Relax BLR.
2139pub const R_AARCH64_TLSDESC_CALL = 569;
2140/// TP-rel. LD/ST off. 11:4.
2141pub const R_AARCH64_TLSLE_LDST128_TPREL_LO12 = 570;
2142/// Likewise; no check.
2143pub const R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC = 571;
2144/// DTP-rel. LD/ST imm. 11:4.
2145pub const R_AARCH64_TLSLD_LDST128_DTPREL_LO12 = 572;
2146/// Likewise; no check.
2147pub const R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC = 573;
2148/// Copy symbol at runtime.
2149pub const R_AARCH64_COPY = 1024;
2150/// Create GOT entry.
2151pub const R_AARCH64_GLOB_DAT = 1025;
2152/// Create PLT entry.
2153pub const R_AARCH64_JUMP_SLOT = 1026;
2154/// Adjust by program base.
2155pub const R_AARCH64_RELATIVE = 1027;
2156/// Module number, 64 bit.
2157pub const R_AARCH64_TLS_DTPMOD = 1028;
2158/// Module-relative offset, 64 bit.
2159pub const R_AARCH64_TLS_DTPREL = 1029;
2160/// TP-relative offset, 64 bit.
2161pub const R_AARCH64_TLS_TPREL = 1030;
2162/// TLS Descriptor.
2163pub const R_AARCH64_TLSDESC = 1031;
2164/// STT_GNU_IFUNC relocation.
2165pub const R_AARCH64_IRELATIVE = 1032;
1897pub const R_AARCH64 = enum(u32) {
1898 /// No relocation.
1899 R_AARCH64_NONE = 0,
1900 /// ILP32 AArch64 relocs.
1901 /// Direct 32 bit.
1902 R_AARCH64_P32_ABS32 = 1,
1903 /// Copy symbol at runtime.
1904 R_AARCH64_P32_COPY = 180,
1905 /// Create GOT entry.
1906 R_AARCH64_P32_GLOB_DAT = 181,
1907 /// Create PLT entry.
1908 R_AARCH64_P32_JUMP_SLOT = 182,
1909 /// Adjust by program base.
1910 R_AARCH64_P32_RELATIVE = 183,
1911 /// Module number, 32 bit.
1912 R_AARCH64_P32_TLS_DTPMOD = 184,
1913 /// Module-relative offset, 32 bit.
1914 R_AARCH64_P32_TLS_DTPREL = 185,
1915 /// TP-relative offset, 32 bit.
1916 R_AARCH64_P32_TLS_TPREL = 186,
1917 /// TLS Descriptor.
1918 R_AARCH64_P32_TLSDESC = 187,
1919 /// STT_GNU_IFUNC relocation.
1920 R_AARCH64_P32_IRELATIVE = 188,
1921 /// LP64 AArch64 relocs.
1922 /// Direct 64 bit.
1923 R_AARCH64_ABS64 = 257,
1924 /// Direct 32 bit.
1925 R_AARCH64_ABS32 = 258,
1926 /// Direct 16-bit.
1927 R_AARCH64_ABS16 = 259,
1928 /// PC-relative 64-bit.
1929 R_AARCH64_PREL64 = 260,
1930 /// PC-relative 32-bit.
1931 R_AARCH64_PREL32 = 261,
1932 /// PC-relative 16-bit.
1933 R_AARCH64_PREL16 = 262,
1934 /// Dir. MOVZ imm. from bits 15:0.
1935 R_AARCH64_MOVW_UABS_G0 = 263,
1936 /// Likewise for MOVK; no check.
1937 R_AARCH64_MOVW_UABS_G0_NC = 264,
1938 /// Dir. MOVZ imm. from bits 31:16.
1939 R_AARCH64_MOVW_UABS_G1 = 265,
1940 /// Likewise for MOVK; no check.
1941 R_AARCH64_MOVW_UABS_G1_NC = 266,
1942 /// Dir. MOVZ imm. from bits 47:32.
1943 R_AARCH64_MOVW_UABS_G2 = 267,
1944 /// Likewise for MOVK; no check.
1945 R_AARCH64_MOVW_UABS_G2_NC = 268,
1946 /// Dir. MOV{K,Z} imm. from 63:48.
1947 R_AARCH64_MOVW_UABS_G3 = 269,
1948 /// Dir. MOV{N,Z} imm. from 15:0.
1949 R_AARCH64_MOVW_SABS_G0 = 270,
1950 /// Dir. MOV{N,Z} imm. from 31:16.
1951 R_AARCH64_MOVW_SABS_G1 = 271,
1952 /// Dir. MOV{N,Z} imm. from 47:32.
1953 R_AARCH64_MOVW_SABS_G2 = 272,
1954 /// PC-rel. LD imm. from bits 20:2.
1955 R_AARCH64_LD_PREL_LO19 = 273,
1956 /// PC-rel. ADR imm. from bits 20:0.
1957 R_AARCH64_ADR_PREL_LO21 = 274,
1958 /// Page-rel. ADRP imm. from 32:12.
1959 R_AARCH64_ADR_PREL_PG_HI21 = 275,
1960 /// Likewise; no overflow check.
1961 R_AARCH64_ADR_PREL_PG_HI21_NC = 276,
1962 /// Dir. ADD imm. from bits 11:0.
1963 R_AARCH64_ADD_ABS_LO12_NC = 277,
1964 /// Likewise for LD/ST; no check.
1965 R_AARCH64_LDST8_ABS_LO12_NC = 278,
1966 /// PC-rel. TBZ/TBNZ imm. from 15:2.
1967 R_AARCH64_TSTBR14 = 279,
1968 /// PC-rel. cond. br. imm. from 20:2.
1969 R_AARCH64_CONDBR19 = 280,
1970 /// PC-rel. B imm. from bits 27:2.
1971 R_AARCH64_JUMP26 = 282,
1972 /// Likewise for CALL.
1973 R_AARCH64_CALL26 = 283,
1974 /// Dir. ADD imm. from bits 11:1.
1975 R_AARCH64_LDST16_ABS_LO12_NC = 284,
1976 /// Likewise for bits 11:2.
1977 R_AARCH64_LDST32_ABS_LO12_NC = 285,
1978 /// Likewise for bits 11:3.
1979 R_AARCH64_LDST64_ABS_LO12_NC = 286,
1980 /// PC-rel. MOV{N,Z} imm. from 15:0.
1981 R_AARCH64_MOVW_PREL_G0 = 287,
1982 /// Likewise for MOVK; no check.
1983 R_AARCH64_MOVW_PREL_G0_NC = 288,
1984 /// PC-rel. MOV{N,Z} imm. from 31:16.
1985 R_AARCH64_MOVW_PREL_G1 = 289,
1986 /// Likewise for MOVK; no check.
1987 R_AARCH64_MOVW_PREL_G1_NC = 290,
1988 /// PC-rel. MOV{N,Z} imm. from 47:32.
1989 R_AARCH64_MOVW_PREL_G2 = 291,
1990 /// Likewise for MOVK; no check.
1991 R_AARCH64_MOVW_PREL_G2_NC = 292,
1992 /// PC-rel. MOV{N,Z} imm. from 63:48.
1993 R_AARCH64_MOVW_PREL_G3 = 293,
1994 /// Dir. ADD imm. from bits 11:4.
1995 R_AARCH64_LDST128_ABS_LO12_NC = 299,
1996 /// GOT-rel. off. MOV{N,Z} imm. 15:0.
1997 R_AARCH64_MOVW_GOTOFF_G0 = 300,
1998 /// Likewise for MOVK; no check.
1999 R_AARCH64_MOVW_GOTOFF_G0_NC = 301,
2000 /// GOT-rel. o. MOV{N,Z} imm. 31:16.
2001 R_AARCH64_MOVW_GOTOFF_G1 = 302,
2002 /// Likewise for MOVK; no check.
2003 R_AARCH64_MOVW_GOTOFF_G1_NC = 303,
2004 /// GOT-rel. o. MOV{N,Z} imm. 47:32.
2005 R_AARCH64_MOVW_GOTOFF_G2 = 304,
2006 /// Likewise for MOVK; no check.
2007 R_AARCH64_MOVW_GOTOFF_G2_NC = 305,
2008 /// GOT-rel. o. MOV{N,Z} imm. 63:48.
2009 R_AARCH64_MOVW_GOTOFF_G3 = 306,
2010 /// GOT-relative 64-bit.
2011 R_AARCH64_GOTREL64 = 307,
2012 /// GOT-relative 32-bit.
2013 R_AARCH64_GOTREL32 = 308,
2014 /// PC-rel. GOT off. load imm. 20:2.
2015 R_AARCH64_GOT_LD_PREL19 = 309,
2016 /// GOT-rel. off. LD/ST imm. 14:3.
2017 R_AARCH64_LD64_GOTOFF_LO15 = 310,
2018 /// P-page-rel. GOT off. ADRP 32:12.
2019 R_AARCH64_ADR_GOT_PAGE = 311,
2020 /// Dir. GOT off. LD/ST imm. 11:3.
2021 R_AARCH64_LD64_GOT_LO12_NC = 312,
2022 /// GOT-page-rel. GOT off. LD/ST 14:3
2023 R_AARCH64_LD64_GOTPAGE_LO15 = 313,
2024 /// PC-relative ADR imm. 20:0.
2025 R_AARCH64_TLSGD_ADR_PREL21 = 512,
2026 /// page-rel. ADRP imm. 32:12.
2027 R_AARCH64_TLSGD_ADR_PAGE21 = 513,
2028 /// direct ADD imm. from 11:0.
2029 R_AARCH64_TLSGD_ADD_LO12_NC = 514,
2030 /// GOT-rel. MOV{N,Z} 31:16.
2031 R_AARCH64_TLSGD_MOVW_G1 = 515,
2032 /// GOT-rel. MOVK imm. 15:0.
2033 R_AARCH64_TLSGD_MOVW_G0_NC = 516,
2034 /// Like 512; local dynamic model.
2035 R_AARCH64_TLSLD_ADR_PREL21 = 517,
2036 /// Like 513; local dynamic model.
2037 R_AARCH64_TLSLD_ADR_PAGE21 = 518,
2038 /// Like 514; local dynamic model.
2039 R_AARCH64_TLSLD_ADD_LO12_NC = 519,
2040 /// Like 515; local dynamic model.
2041 R_AARCH64_TLSLD_MOVW_G1 = 520,
2042 /// Like 516; local dynamic model.
2043 R_AARCH64_TLSLD_MOVW_G0_NC = 521,
2044 /// TLS PC-rel. load imm. 20:2.
2045 R_AARCH64_TLSLD_LD_PREL19 = 522,
2046 /// TLS DTP-rel. MOV{N,Z} 47:32.
2047 R_AARCH64_TLSLD_MOVW_DTPREL_G2 = 523,
2048 /// TLS DTP-rel. MOV{N,Z} 31:16.
2049 R_AARCH64_TLSLD_MOVW_DTPREL_G1 = 524,
2050 /// Likewise; MOVK; no check.
2051 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC = 525,
2052 /// TLS DTP-rel. MOV{N,Z} 15:0.
2053 R_AARCH64_TLSLD_MOVW_DTPREL_G0 = 526,
2054 /// Likewise; MOVK; no check.
2055 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC = 527,
2056 /// DTP-rel. ADD imm. from 23:12.
2057 R_AARCH64_TLSLD_ADD_DTPREL_HI12 = 528,
2058 /// DTP-rel. ADD imm. from 11:0.
2059 R_AARCH64_TLSLD_ADD_DTPREL_LO12 = 529,
2060 /// Likewise; no ovfl. check.
2061 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC = 530,
2062 /// DTP-rel. LD/ST imm. 11:0.
2063 R_AARCH64_TLSLD_LDST8_DTPREL_LO12 = 531,
2064 /// Likewise; no check.
2065 R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = 532,
2066 /// DTP-rel. LD/ST imm. 11:1.
2067 R_AARCH64_TLSLD_LDST16_DTPREL_LO12 = 533,
2068 /// Likewise; no check.
2069 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = 534,
2070 /// DTP-rel. LD/ST imm. 11:2.
2071 R_AARCH64_TLSLD_LDST32_DTPREL_LO12 = 535,
2072 /// Likewise; no check.
2073 R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = 536,
2074 /// DTP-rel. LD/ST imm. 11:3.
2075 R_AARCH64_TLSLD_LDST64_DTPREL_LO12 = 537,
2076 /// Likewise; no check.
2077 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = 538,
2078 /// GOT-rel. MOV{N,Z} 31:16.
2079 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 539,
2080 /// GOT-rel. MOVK 15:0.
2081 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 540,
2082 /// Page-rel. ADRP 32:12.
2083 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 541,
2084 /// Direct LD off. 11:3.
2085 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 542,
2086 /// PC-rel. load imm. 20:2.
2087 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 543,
2088 /// TLS TP-rel. MOV{N,Z} 47:32.
2089 R_AARCH64_TLSLE_MOVW_TPREL_G2 = 544,
2090 /// TLS TP-rel. MOV{N,Z} 31:16.
2091 R_AARCH64_TLSLE_MOVW_TPREL_G1 = 545,
2092 /// Likewise; MOVK; no check.
2093 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC = 546,
2094 /// TLS TP-rel. MOV{N,Z} 15:0.
2095 R_AARCH64_TLSLE_MOVW_TPREL_G0 = 547,
2096 /// Likewise; MOVK; no check.
2097 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC = 548,
2098 /// TP-rel. ADD imm. 23:12.
2099 R_AARCH64_TLSLE_ADD_TPREL_HI12 = 549,
2100 /// TP-rel. ADD imm. 11:0.
2101 R_AARCH64_TLSLE_ADD_TPREL_LO12 = 550,
2102 /// Likewise; no ovfl. check.
2103 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC = 551,
2104 /// TP-rel. LD/ST off. 11:0.
2105 R_AARCH64_TLSLE_LDST8_TPREL_LO12 = 552,
2106 /// Likewise; no ovfl. check.
2107 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC = 553,
2108 /// TP-rel. LD/ST off. 11:1.
2109 R_AARCH64_TLSLE_LDST16_TPREL_LO12 = 554,
2110 /// Likewise; no check.
2111 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC = 555,
2112 /// TP-rel. LD/ST off. 11:2.
2113 R_AARCH64_TLSLE_LDST32_TPREL_LO12 = 556,
2114 /// Likewise; no check.
2115 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC = 557,
2116 /// TP-rel. LD/ST off. 11:3.
2117 R_AARCH64_TLSLE_LDST64_TPREL_LO12 = 558,
2118 /// Likewise; no check.
2119 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC = 559,
2120 /// PC-rel. load immediate 20:2.
2121 R_AARCH64_TLSDESC_LD_PREL19 = 560,
2122 /// PC-rel. ADR immediate 20:0.
2123 R_AARCH64_TLSDESC_ADR_PREL21 = 561,
2124 /// Page-rel. ADRP imm. 32:12.
2125 R_AARCH64_TLSDESC_ADR_PAGE21 = 562,
2126 /// Direct LD off. from 11:3.
2127 R_AARCH64_TLSDESC_LD64_LO12 = 563,
2128 /// Direct ADD imm. from 11:0.
2129 R_AARCH64_TLSDESC_ADD_LO12 = 564,
2130 /// GOT-rel. MOV{N,Z} imm. 31:16.
2131 R_AARCH64_TLSDESC_OFF_G1 = 565,
2132 /// GOT-rel. MOVK imm. 15:0; no ck.
2133 R_AARCH64_TLSDESC_OFF_G0_NC = 566,
2134 /// Relax LDR.
2135 R_AARCH64_TLSDESC_LDR = 567,
2136 /// Relax ADD.
2137 R_AARCH64_TLSDESC_ADD = 568,
2138 /// Relax BLR.
2139 R_AARCH64_TLSDESC_CALL = 569,
2140 /// TP-rel. LD/ST off. 11:4.
2141 R_AARCH64_TLSLE_LDST128_TPREL_LO12 = 570,
2142 /// Likewise; no check.
2143 R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC = 571,
2144 /// DTP-rel. LD/ST imm. 11:4.
2145 R_AARCH64_TLSLD_LDST128_DTPREL_LO12 = 572,
2146 /// Likewise; no check.
2147 R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC = 573,
2148 /// Copy symbol at runtime.
2149 R_AARCH64_COPY = 1024,
2150 /// Create GOT entry.
2151 R_AARCH64_GLOB_DAT = 1025,
2152 /// Create PLT entry.
2153 R_AARCH64_JUMP_SLOT = 1026,
2154 /// Adjust by program base.
2155 R_AARCH64_RELATIVE = 1027,
2156 /// Module number, 64 bit.
2157 R_AARCH64_TLS_DTPMOD = 1028,
2158 /// Module-relative offset, 64 bit.
2159 R_AARCH64_TLS_DTPREL = 1029,
2160 /// TP-relative offset, 64 bit.
2161 R_AARCH64_TLS_TPREL = 1030,
2162 /// TLS Descriptor.
2163 R_AARCH64_TLSDESC = 1031,
2164 /// STT_GNU_IFUNC relocation.
2165 R_AARCH64_IRELATIVE = 1032,
2166};
21662167
21672168/// RISC-V relocations.
2168pub const R_RISCV_R_RISCV_NONE = 0;
2169pub const R_RISCV_R_RISCV_32 = 1;
2170pub const R_RISCV_R_RISCV_64 = 2;
2171pub const R_RISCV_R_RISCV_RELATIVE = 3;
2172pub const R_RISCV_R_RISCV_COPY = 4;
2173pub const R_RISCV_R_RISCV_JUMP_SLOT = 5;
2174pub const R_RISCV_R_RISCV_TLS_DTPMOD32 = 6;
2175pub const R_RISCV_R_RISCV_TLS_DTPMOD64 = 7;
2176pub const R_RISCV_R_RISCV_TLS_DTPREL32 = 8;
2177pub const R_RISCV_R_RISCV_TLS_DTPREL64 = 9;
2178pub const R_RISCV_R_RISCV_TLS_TPREL32 = 10;
2179pub const R_RISCV_R_RISCV_TLS_TPREL64 = 11;
2180pub const R_RISCV_R_RISCV_BRANCH = 16;
2181pub const R_RISCV_R_RISCV_JAL = 17;
2182pub const R_RISCV_R_RISCV_CALL = 18;
2183pub const R_RISCV_R_RISCV_CALL_PLT = 19;
2184pub const R_RISCV_R_RISCV_GOT_HI20 = 20;
2185pub const R_RISCV_R_RISCV_TLS_GOT_HI20 = 21;
2186pub const R_RISCV_R_RISCV_TLS_GD_HI20 = 22;
2187pub const R_RISCV_R_RISCV_PCREL_HI20 = 23;
2188pub const R_RISCV_R_RISCV_PCREL_LO12_I = 24;
2189pub const R_RISCV_R_RISCV_PCREL_LO12_S = 25;
2190pub const R_RISCV_R_RISCV_HI20 = 26;
2191pub const R_RISCV_R_RISCV_LO12_I = 27;
2192pub const R_RISCV_R_RISCV_LO12_S = 28;
2193pub const R_RISCV_R_RISCV_TPREL_HI20 = 29;
2194pub const R_RISCV_R_RISCV_TPREL_LO12_I = 30;
2195pub const R_RISCV_R_RISCV_TPREL_LO12_S = 31;
2196pub const R_RISCV_R_RISCV_TPREL_ADD = 32;
2197pub const R_RISCV_R_RISCV_ADD8 = 33;
2198pub const R_RISCV_R_RISCV_ADD16 = 34;
2199pub const R_RISCV_R_RISCV_ADD32 = 35;
2200pub const R_RISCV_R_RISCV_ADD64 = 36;
2201pub const R_RISCV_R_RISCV_SUB8 = 37;
2202pub const R_RISCV_R_RISCV_SUB16 = 38;
2203pub const R_RISCV_R_RISCV_SUB32 = 39;
2204pub const R_RISCV_R_RISCV_SUB64 = 40;
2205pub const R_RISCV_R_RISCV_GNU_VTINHERIT = 41;
2206pub const R_RISCV_R_RISCV_GNU_VTENTRY = 42;
2207pub const R_RISCV_R_RISCV_ALIGN = 43;
2208pub const R_RISCV_R_RISCV_RVC_BRANCH = 44;
2209pub const R_RISCV_R_RISCV_RVC_JUMP = 45;
2210pub const R_RISCV_R_RISCV_RVC_LUI = 46;
2211pub const R_RISCV_R_RISCV_GPREL_I = 47;
2212pub const R_RISCV_R_RISCV_GPREL_S = 48;
2213pub const R_RISCV_R_RISCV_TPREL_I = 49;
2214pub const R_RISCV_R_RISCV_TPREL_S = 50;
2215pub const R_RISCV_R_RISCV_RELAX = 51;
2216pub const R_RISCV_R_RISCV_SUB6 = 52;
2217pub const R_RISCV_R_RISCV_SET6 = 53;
2218pub const R_RISCV_R_RISCV_SET8 = 54;
2219pub const R_RISCV_R_RISCV_SET16 = 55;
2220pub const R_RISCV_R_RISCV_SET32 = 56;
2221pub const R_RISCV_R_RISCV_32_PCREL = 57;
2222pub const R_RISCV_R_RISCV_IRELATIVE = 58;
2223pub const R_RISCV_R_RISCV_PLT32 = 59;
2224pub const R_RISCV_R_RISCV_SET_ULEB128 = 60;
2225pub const R_RISCV_R_RISCV_SUB_ULEB128 = 61;
2169pub const R_RISCV = enum(u32) {
2170 R_RISCV_NONE = 0,
2171 R_RISCV_32 = 1,
2172 R_RISCV_64 = 2,
2173 R_RISCV_RELATIVE = 3,
2174 R_RISCV_COPY = 4,
2175 R_RISCV_JUMP_SLOT = 5,
2176 R_RISCV_TLS_DTPMOD32 = 6,
2177 R_RISCV_TLS_DTPMOD64 = 7,
2178 R_RISCV_TLS_DTPREL32 = 8,
2179 R_RISCV_TLS_DTPREL64 = 9,
2180 R_RISCV_TLS_TPREL32 = 10,
2181 R_RISCV_TLS_TPREL64 = 11,
2182 R_RISCV_BRANCH = 16,
2183 R_RISCV_JAL = 17,
2184 R_RISCV_CALL = 18,
2185 R_RISCV_CALL_PLT = 19,
2186 R_RISCV_GOT_HI20 = 20,
2187 R_RISCV_TLS_GOT_HI20 = 21,
2188 R_RISCV_TLS_GD_HI20 = 22,
2189 R_RISCV_PCREL_HI20 = 23,
2190 R_RISCV_PCREL_LO12_I = 24,
2191 R_RISCV_PCREL_LO12_S = 25,
2192 R_RISCV_HI20 = 26,
2193 R_RISCV_LO12_I = 27,
2194 R_RISCV_LO12_S = 28,
2195 R_RISCV_TPREL_HI20 = 29,
2196 R_RISCV_TPREL_LO12_I = 30,
2197 R_RISCV_TPREL_LO12_S = 31,
2198 R_RISCV_TPREL_ADD = 32,
2199 R_RISCV_ADD8 = 33,
2200 R_RISCV_ADD16 = 34,
2201 R_RISCV_ADD32 = 35,
2202 R_RISCV_ADD64 = 36,
2203 R_RISCV_SUB8 = 37,
2204 R_RISCV_SUB16 = 38,
2205 R_RISCV_SUB32 = 39,
2206 R_RISCV_SUB64 = 40,
2207 R_RISCV_GNU_VTINHERIT = 41,
2208 R_RISCV_GNU_VTENTRY = 42,
2209 R_RISCV_ALIGN = 43,
2210 R_RISCV_RVC_BRANCH = 44,
2211 R_RISCV_RVC_JUMP = 45,
2212 R_RISCV_RVC_LUI = 46,
2213 R_RISCV_GPREL_I = 47,
2214 R_RISCV_GPREL_S = 48,
2215 R_RISCV_TPREL_I = 49,
2216 R_RISCV_TPREL_S = 50,
2217 R_RISCV_RELAX = 51,
2218 R_RISCV_SUB6 = 52,
2219 R_RISCV_SET6 = 53,
2220 R_RISCV_SET8 = 54,
2221 R_RISCV_SET16 = 55,
2222 R_RISCV_SET32 = 56,
2223 R_RISCV_32_PCREL = 57,
2224 R_RISCV_IRELATIVE = 58,
2225 R_RISCV_PLT32 = 59,
2226 R_RISCV_SET_ULEB128 = 60,
2227 R_RISCV_SUB_ULEB128 = 61,
2228};
22262229
22272230pub const STV = enum(u2) {
22282231 DEFAULT = 0,