summaryrefslogtreecommitdiff
path: root/devdocs/go/debug%2Felf%2Findex.html
blob: 657f77389e4963dc790a549e83fc16f0eb1585ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
<h1> Package elf  </h1>     <ul id="short-nav">
<li><code>import "debug/elf"</code></li>
<li><a href="#pkg-overview" class="overviewLink">Overview</a></li>
<li><a href="#pkg-index" class="indexLink">Index</a></li>
</ul>     <h2 id="pkg-overview">Overview </h2> <p>Package elf implements access to ELF object files. </p>
<h3 id="hdr-Security">Security</h3> <p>This package is not designed to be hardened against adversarial inputs, and is outside the scope of <a href="https://go.dev/security/policy">https://go.dev/security/policy</a>. In particular, only basic validation is done when parsing object files. As such, care should be taken when parsing untrusted inputs, as parsing malformed files may consume significant resources, or cause panics. </p>     <h2 id="pkg-index">Index </h2>  <ul id="manual-nav">
<li><a href="#pkg-constants">Constants</a></li>
<li><a href="#pkg-variables">Variables</a></li>
<li><a href="#R_INFO">func R_INFO(sym, typ uint32) uint64</a></li>
<li><a href="#R_INFO32">func R_INFO32(sym, typ uint32) uint32</a></li>
<li><a href="#R_SYM32">func R_SYM32(info uint32) uint32</a></li>
<li><a href="#R_SYM64">func R_SYM64(info uint64) uint32</a></li>
<li><a href="#R_TYPE32">func R_TYPE32(info uint32) uint32</a></li>
<li><a href="#R_TYPE64">func R_TYPE64(info uint64) uint32</a></li>
<li><a href="#ST_INFO">func ST_INFO(bind SymBind, typ SymType) uint8</a></li>
<li><a href="#Chdr32">type Chdr32</a></li>
<li><a href="#Chdr64">type Chdr64</a></li>
<li><a href="#Class">type Class</a></li>
<li> <a href="#Class.GoString">func (i Class) GoString() string</a>
</li>
<li> <a href="#Class.String">func (i Class) String() string</a>
</li>
<li><a href="#CompressionType">type CompressionType</a></li>
<li> <a href="#CompressionType.GoString">func (i CompressionType) GoString() string</a>
</li>
<li> <a href="#CompressionType.String">func (i CompressionType) String() string</a>
</li>
<li><a href="#Data">type Data</a></li>
<li> <a href="#Data.GoString">func (i Data) GoString() string</a>
</li>
<li> <a href="#Data.String">func (i Data) String() string</a>
</li>
<li><a href="#Dyn32">type Dyn32</a></li>
<li><a href="#Dyn64">type Dyn64</a></li>
<li><a href="#DynFlag">type DynFlag</a></li>
<li> <a href="#DynFlag.GoString">func (i DynFlag) GoString() string</a>
</li>
<li> <a href="#DynFlag.String">func (i DynFlag) String() string</a>
</li>
<li><a href="#DynFlag1">type DynFlag1</a></li>
<li> <a href="#DynFlag1.GoString">func (i DynFlag1) GoString() string</a>
</li>
<li> <a href="#DynFlag1.String">func (i DynFlag1) String() string</a>
</li>
<li><a href="#DynTag">type DynTag</a></li>
<li> <a href="#DynTag.GoString">func (i DynTag) GoString() string</a>
</li>
<li> <a href="#DynTag.String">func (i DynTag) String() string</a>
</li>
<li><a href="#File">type File</a></li>
<li> <a href="#NewFile">func NewFile(r io.ReaderAt) (*File, error)</a>
</li>
<li> <a href="#Open">func Open(name string) (*File, error)</a>
</li>
<li> <a href="#File.Close">func (f *File) Close() error</a>
</li>
<li> <a href="#File.DWARF">func (f *File) DWARF() (*dwarf.Data, error)</a>
</li>
<li> <a href="#File.DynString">func (f *File) DynString(tag DynTag) ([]string, error)</a>
</li>
<li> <a href="#File.DynValue">func (f *File) DynValue(tag DynTag) ([]uint64, error)</a>
</li>
<li> <a href="#File.DynamicSymbols">func (f *File) DynamicSymbols() ([]Symbol, error)</a>
</li>
<li> <a href="#File.ImportedLibraries">func (f *File) ImportedLibraries() ([]string, error)</a>
</li>
<li> <a href="#File.ImportedSymbols">func (f *File) ImportedSymbols() ([]ImportedSymbol, error)</a>
</li>
<li> <a href="#File.Section">func (f *File) Section(name string) *Section</a>
</li>
<li> <a href="#File.SectionByType">func (f *File) SectionByType(typ SectionType) *Section</a>
</li>
<li> <a href="#File.Symbols">func (f *File) Symbols() ([]Symbol, error)</a>
</li>
<li><a href="#FileHeader">type FileHeader</a></li>
<li><a href="#FormatError">type FormatError</a></li>
<li> <a href="#FormatError.Error">func (e *FormatError) Error() string</a>
</li>
<li><a href="#Header32">type Header32</a></li>
<li><a href="#Header64">type Header64</a></li>
<li><a href="#ImportedSymbol">type ImportedSymbol</a></li>
<li><a href="#Machine">type Machine</a></li>
<li> <a href="#Machine.GoString">func (i Machine) GoString() string</a>
</li>
<li> <a href="#Machine.String">func (i Machine) String() string</a>
</li>
<li><a href="#NType">type NType</a></li>
<li> <a href="#NType.GoString">func (i NType) GoString() string</a>
</li>
<li> <a href="#NType.String">func (i NType) String() string</a>
</li>
<li><a href="#OSABI">type OSABI</a></li>
<li> <a href="#OSABI.GoString">func (i OSABI) GoString() string</a>
</li>
<li> <a href="#OSABI.String">func (i OSABI) String() string</a>
</li>
<li><a href="#Prog">type Prog</a></li>
<li> <a href="#Prog.Open">func (p *Prog) Open() io.ReadSeeker</a>
</li>
<li><a href="#Prog32">type Prog32</a></li>
<li><a href="#Prog64">type Prog64</a></li>
<li><a href="#ProgFlag">type ProgFlag</a></li>
<li> <a href="#ProgFlag.GoString">func (i ProgFlag) GoString() string</a>
</li>
<li> <a href="#ProgFlag.String">func (i ProgFlag) String() string</a>
</li>
<li><a href="#ProgHeader">type ProgHeader</a></li>
<li><a href="#ProgType">type ProgType</a></li>
<li> <a href="#ProgType.GoString">func (i ProgType) GoString() string</a>
</li>
<li> <a href="#ProgType.String">func (i ProgType) String() string</a>
</li>
<li><a href="#R_386">type R_386</a></li>
<li> <a href="#R_386.GoString">func (i R_386) GoString() string</a>
</li>
<li> <a href="#R_386.String">func (i R_386) String() string</a>
</li>
<li><a href="#R_390">type R_390</a></li>
<li> <a href="#R_390.GoString">func (i R_390) GoString() string</a>
</li>
<li> <a href="#R_390.String">func (i R_390) String() string</a>
</li>
<li><a href="#R_AARCH64">type R_AARCH64</a></li>
<li> <a href="#R_AARCH64.GoString">func (i R_AARCH64) GoString() string</a>
</li>
<li> <a href="#R_AARCH64.String">func (i R_AARCH64) String() string</a>
</li>
<li><a href="#R_ALPHA">type R_ALPHA</a></li>
<li> <a href="#R_ALPHA.GoString">func (i R_ALPHA) GoString() string</a>
</li>
<li> <a href="#R_ALPHA.String">func (i R_ALPHA) String() string</a>
</li>
<li><a href="#R_ARM">type R_ARM</a></li>
<li> <a href="#R_ARM.GoString">func (i R_ARM) GoString() string</a>
</li>
<li> <a href="#R_ARM.String">func (i R_ARM) String() string</a>
</li>
<li><a href="#R_LARCH">type R_LARCH</a></li>
<li> <a href="#R_LARCH.GoString">func (i R_LARCH) GoString() string</a>
</li>
<li> <a href="#R_LARCH.String">func (i R_LARCH) String() string</a>
</li>
<li><a href="#R_MIPS">type R_MIPS</a></li>
<li> <a href="#R_MIPS.GoString">func (i R_MIPS) GoString() string</a>
</li>
<li> <a href="#R_MIPS.String">func (i R_MIPS) String() string</a>
</li>
<li><a href="#R_PPC">type R_PPC</a></li>
<li> <a href="#R_PPC.GoString">func (i R_PPC) GoString() string</a>
</li>
<li> <a href="#R_PPC.String">func (i R_PPC) String() string</a>
</li>
<li><a href="#R_PPC64">type R_PPC64</a></li>
<li> <a href="#R_PPC64.GoString">func (i R_PPC64) GoString() string</a>
</li>
<li> <a href="#R_PPC64.String">func (i R_PPC64) String() string</a>
</li>
<li><a href="#R_RISCV">type R_RISCV</a></li>
<li> <a href="#R_RISCV.GoString">func (i R_RISCV) GoString() string</a>
</li>
<li> <a href="#R_RISCV.String">func (i R_RISCV) String() string</a>
</li>
<li><a href="#R_SPARC">type R_SPARC</a></li>
<li> <a href="#R_SPARC.GoString">func (i R_SPARC) GoString() string</a>
</li>
<li> <a href="#R_SPARC.String">func (i R_SPARC) String() string</a>
</li>
<li><a href="#R_X86_64">type R_X86_64</a></li>
<li> <a href="#R_X86_64.GoString">func (i R_X86_64) GoString() string</a>
</li>
<li> <a href="#R_X86_64.String">func (i R_X86_64) String() string</a>
</li>
<li><a href="#Rel32">type Rel32</a></li>
<li><a href="#Rel64">type Rel64</a></li>
<li><a href="#Rela32">type Rela32</a></li>
<li><a href="#Rela64">type Rela64</a></li>
<li><a href="#Section">type Section</a></li>
<li> <a href="#Section.Data">func (s *Section) Data() ([]byte, error)</a>
</li>
<li> <a href="#Section.Open">func (s *Section) Open() io.ReadSeeker</a>
</li>
<li><a href="#Section32">type Section32</a></li>
<li><a href="#Section64">type Section64</a></li>
<li><a href="#SectionFlag">type SectionFlag</a></li>
<li> <a href="#SectionFlag.GoString">func (i SectionFlag) GoString() string</a>
</li>
<li> <a href="#SectionFlag.String">func (i SectionFlag) String() string</a>
</li>
<li><a href="#SectionHeader">type SectionHeader</a></li>
<li><a href="#SectionIndex">type SectionIndex</a></li>
<li> <a href="#SectionIndex.GoString">func (i SectionIndex) GoString() string</a>
</li>
<li> <a href="#SectionIndex.String">func (i SectionIndex) String() string</a>
</li>
<li><a href="#SectionType">type SectionType</a></li>
<li> <a href="#SectionType.GoString">func (i SectionType) GoString() string</a>
</li>
<li> <a href="#SectionType.String">func (i SectionType) String() string</a>
</li>
<li><a href="#Sym32">type Sym32</a></li>
<li><a href="#Sym64">type Sym64</a></li>
<li><a href="#SymBind">type SymBind</a></li>
<li> <a href="#ST_BIND">func ST_BIND(info uint8) SymBind</a>
</li>
<li> <a href="#SymBind.GoString">func (i SymBind) GoString() string</a>
</li>
<li> <a href="#SymBind.String">func (i SymBind) String() string</a>
</li>
<li><a href="#SymType">type SymType</a></li>
<li> <a href="#ST_TYPE">func ST_TYPE(info uint8) SymType</a>
</li>
<li> <a href="#SymType.GoString">func (i SymType) GoString() string</a>
</li>
<li> <a href="#SymType.String">func (i SymType) String() string</a>
</li>
<li><a href="#SymVis">type SymVis</a></li>
<li> <a href="#ST_VISIBILITY">func ST_VISIBILITY(other uint8) SymVis</a>
</li>
<li> <a href="#SymVis.GoString">func (i SymVis) GoString() string</a>
</li>
<li> <a href="#SymVis.String">func (i SymVis) String() string</a>
</li>
<li><a href="#Symbol">type Symbol</a></li>
<li><a href="#Type">type Type</a></li>
<li> <a href="#Type.GoString">func (i Type) GoString() string</a>
</li>
<li> <a href="#Type.String">func (i Type) String() string</a>
</li>
<li><a href="#Version">type Version</a></li>
<li> <a href="#Version.GoString">func (i Version) GoString() string</a>
</li>
<li> <a href="#Version.String">func (i Version) String() string</a>
</li>
</ul> <h3>Package files</h3> <p>  <span>elf.go</span> <span>file.go</span> <span>reader.go</span>  </p>   <h2 id="pkg-constants">Constants</h2> <p>Indexes into the Header.Ident array. </p>
<pre data-language="go">const (
    EI_CLASS      = 4  /* Class of machine. */
    EI_DATA       = 5  /* Data format. */
    EI_VERSION    = 6  /* ELF format version. */
    EI_OSABI      = 7  /* Operating system / ABI identification */
    EI_ABIVERSION = 8  /* ABI version */
    EI_PAD        = 9  /* Start of padding (per SVR4 ABI). */
    EI_NIDENT     = 16 /* Size of e_ident array. */
)</pre> <p>Magic number for the elf trampoline, chosen wisely to be an immediate value. </p>
<pre data-language="go">const ARM_MAGIC_TRAMP_NUMBER = 0x5c000003</pre> <p>Initial magic number for ELF files. </p>
<pre data-language="go">const ELFMAG = "\177ELF"</pre> <pre data-language="go">const Sym32Size = 16</pre> <pre data-language="go">const Sym64Size = 24</pre> <h2 id="pkg-variables">Variables</h2> <p>ErrNoSymbols is returned by <a href="#File.Symbols">File.Symbols</a> and <a href="#File.DynamicSymbols">File.DynamicSymbols</a> if there is no such section in the File. </p>
<pre data-language="go">var ErrNoSymbols = errors.New("no symbol section")</pre> <h2 id="R_INFO">func <span>R_INFO</span>  </h2> <pre data-language="go">func R_INFO(sym, typ uint32) uint64</pre> <h2 id="R_INFO32">func <span>R_INFO32</span>  </h2> <pre data-language="go">func R_INFO32(sym, typ uint32) uint32</pre> <h2 id="R_SYM32">func <span>R_SYM32</span>  </h2> <pre data-language="go">func R_SYM32(info uint32) uint32</pre> <h2 id="R_SYM64">func <span>R_SYM64</span>  </h2> <pre data-language="go">func R_SYM64(info uint64) uint32</pre> <h2 id="R_TYPE32">func <span>R_TYPE32</span>  </h2> <pre data-language="go">func R_TYPE32(info uint32) uint32</pre> <h2 id="R_TYPE64">func <span>R_TYPE64</span>  </h2> <pre data-language="go">func R_TYPE64(info uint64) uint32</pre> <h2 id="ST_INFO">func <span>ST_INFO</span>  </h2> <pre data-language="go">func ST_INFO(bind SymBind, typ SymType) uint8</pre> <h2 id="Chdr32">type <span>Chdr32</span>  <span title="Added in Go 1.6">1.6</span> </h2> <p>ELF32 Compression header. </p>
<pre data-language="go">type Chdr32 struct {
    Type      uint32
    Size      uint32
    Addralign uint32
}
</pre> <h2 id="Chdr64">type <span>Chdr64</span>  <span title="Added in Go 1.6">1.6</span> </h2> <p>ELF64 Compression header. </p>
<pre data-language="go">type Chdr64 struct {
    Type uint32

    Size      uint64
    Addralign uint64
    // contains filtered or unexported fields
}
</pre> <h2 id="Class">type <span>Class</span>  </h2> <p>Class is found in Header.Ident[EI_CLASS] and Header.Class. </p>
<pre data-language="go">type Class byte</pre> <pre data-language="go">const (
    ELFCLASSNONE Class = 0 /* Unknown class. */
    ELFCLASS32   Class = 1 /* 32-bit architecture. */
    ELFCLASS64   Class = 2 /* 64-bit architecture. */
)</pre> <h3 id="Class.GoString">func (Class) <span>GoString</span>  </h3> <pre data-language="go">func (i Class) GoString() string</pre> <h3 id="Class.String">func (Class) <span>String</span>  </h3> <pre data-language="go">func (i Class) String() string</pre> <h2 id="CompressionType">type <span>CompressionType</span>  <span title="Added in Go 1.6">1.6</span> </h2> <p>Section compression type. </p>
<pre data-language="go">type CompressionType int</pre> <pre data-language="go">const (
    COMPRESS_ZLIB   CompressionType = 1          /* ZLIB compression. */
    COMPRESS_ZSTD   CompressionType = 2          /* ZSTD compression. */
    COMPRESS_LOOS   CompressionType = 0x60000000 /* First OS-specific. */
    COMPRESS_HIOS   CompressionType = 0x6fffffff /* Last OS-specific. */
    COMPRESS_LOPROC CompressionType = 0x70000000 /* First processor-specific type. */
    COMPRESS_HIPROC CompressionType = 0x7fffffff /* Last processor-specific type. */
)</pre> <h3 id="CompressionType.GoString">func (CompressionType) <span>GoString</span>  <span title="Added in Go 1.6">1.6</span> </h3> <pre data-language="go">func (i CompressionType) GoString() string</pre> <h3 id="CompressionType.String">func (CompressionType) <span>String</span>  <span title="Added in Go 1.6">1.6</span> </h3> <pre data-language="go">func (i CompressionType) String() string</pre> <h2 id="Data">type <span>Data</span>  </h2> <p>Data is found in Header.Ident[EI_DATA] and Header.Data. </p>
<pre data-language="go">type Data byte</pre> <pre data-language="go">const (
    ELFDATANONE Data = 0 /* Unknown data format. */
    ELFDATA2LSB Data = 1 /* 2's complement little-endian. */
    ELFDATA2MSB Data = 2 /* 2's complement big-endian. */
)</pre> <h3 id="Data.GoString">func (Data) <span>GoString</span>  </h3> <pre data-language="go">func (i Data) GoString() string</pre> <h3 id="Data.String">func (Data) <span>String</span>  </h3> <pre data-language="go">func (i Data) String() string</pre> <h2 id="Dyn32">type <span>Dyn32</span>  </h2> <p>ELF32 Dynamic structure. The ".dynamic" section contains an array of them. </p>
<pre data-language="go">type Dyn32 struct {
    Tag int32  /* Entry type. */
    Val uint32 /* Integer/Address value. */
}
</pre> <h2 id="Dyn64">type <span>Dyn64</span>  </h2> <p>ELF64 Dynamic structure. The ".dynamic" section contains an array of them. </p>
<pre data-language="go">type Dyn64 struct {
    Tag int64  /* Entry type. */
    Val uint64 /* Integer/address value */
}
</pre> <h2 id="DynFlag">type <span>DynFlag</span>  </h2> <p>DT_FLAGS values. </p>
<pre data-language="go">type DynFlag int</pre> <pre data-language="go">const (
    DF_ORIGIN DynFlag = 0x0001 /* Indicates that the object being loaded may
       make reference to the
       $ORIGIN substitution string */
    DF_SYMBOLIC DynFlag = 0x0002 /* Indicates "symbolic" linking. */
    DF_TEXTREL  DynFlag = 0x0004 /* Indicates there may be relocations in non-writable segments. */
    DF_BIND_NOW DynFlag = 0x0008 /* Indicates that the dynamic linker should
       process all relocations for the object
       containing this entry before transferring
       control to the program. */
    DF_STATIC_TLS DynFlag = 0x0010 /* Indicates that the shared object or
       executable contains code using a static
       thread-local storage scheme. */
)</pre> <h3 id="DynFlag.GoString">func (DynFlag) <span>GoString</span>  </h3> <pre data-language="go">func (i DynFlag) GoString() string</pre> <h3 id="DynFlag.String">func (DynFlag) <span>String</span>  </h3> <pre data-language="go">func (i DynFlag) String() string</pre> <h2 id="DynFlag1">type <span>DynFlag1</span>  <span title="Added in Go 1.21">1.21</span> </h2> <p>DT_FLAGS_1 values. </p>
<pre data-language="go">type DynFlag1 uint32</pre> <pre data-language="go">const (
    // Indicates that all relocations for this object must be processed before
    // returning control to the program.
    DF_1_NOW DynFlag1 = 0x00000001
    // Unused.
    DF_1_GLOBAL DynFlag1 = 0x00000002
    // Indicates that the object is a member of a group.
    DF_1_GROUP DynFlag1 = 0x00000004
    // Indicates that the object cannot be deleted from a process.
    DF_1_NODELETE DynFlag1 = 0x00000008
    // Meaningful only for filters. Indicates that all associated filtees be
    // processed immediately.
    DF_1_LOADFLTR DynFlag1 = 0x00000010
    // Indicates that this object's initialization section be run before any other
    // objects loaded.
    DF_1_INITFIRST DynFlag1 = 0x00000020
    // Indicates that the object cannot be added to a running process with dlopen.
    DF_1_NOOPEN DynFlag1 = 0x00000040
    // Indicates the object requires $ORIGIN processing.
    DF_1_ORIGIN DynFlag1 = 0x00000080
    // Indicates that the object should use direct binding information.
    DF_1_DIRECT DynFlag1 = 0x00000100
    // Unused.
    DF_1_TRANS DynFlag1 = 0x00000200
    // Indicates that the objects symbol table is to interpose before all symbols
    // except the primary load object, which is typically the executable.
    DF_1_INTERPOSE DynFlag1 = 0x00000400
    // Indicates that the search for dependencies of this object ignores any
    // default library search paths.
    DF_1_NODEFLIB DynFlag1 = 0x00000800
    // Indicates that this object is not dumped by dldump. Candidates are objects
    // with no relocations that might get included when generating alternative
    // objects using.
    DF_1_NODUMP DynFlag1 = 0x00001000
    // Identifies this object as a configuration alternative object generated by
    // crle. Triggers the runtime linker to search for a configuration file $ORIGIN/ld.config.app-name.
    DF_1_CONFALT DynFlag1 = 0x00002000
    // Meaningful only for filtees. Terminates a filters search for any
    // further filtees.
    DF_1_ENDFILTEE DynFlag1 = 0x00004000
    // Indicates that this object has displacement relocations applied.
    DF_1_DISPRELDNE DynFlag1 = 0x00008000
    // Indicates that this object has displacement relocations pending.
    DF_1_DISPRELPND DynFlag1 = 0x00010000
    // Indicates that this object contains symbols that cannot be directly
    // bound to.
    DF_1_NODIRECT DynFlag1 = 0x00020000
    // Reserved for internal use by the kernel runtime-linker.
    DF_1_IGNMULDEF DynFlag1 = 0x00040000
    // Reserved for internal use by the kernel runtime-linker.
    DF_1_NOKSYMS DynFlag1 = 0x00080000
    // Reserved for internal use by the kernel runtime-linker.
    DF_1_NOHDR DynFlag1 = 0x00100000
    // Indicates that this object has been edited or has been modified since the
    // objects original construction by the link-editor.
    DF_1_EDITED DynFlag1 = 0x00200000
    // Reserved for internal use by the kernel runtime-linker.
    DF_1_NORELOC DynFlag1 = 0x00400000
    // Indicates that the object contains individual symbols that should interpose
    // before all symbols except the primary load object, which is typically the
    // executable.
    DF_1_SYMINTPOSE DynFlag1 = 0x00800000
    // Indicates that the executable requires global auditing.
    DF_1_GLOBAUDIT DynFlag1 = 0x01000000
    // Indicates that the object defines, or makes reference to singleton symbols.
    DF_1_SINGLETON DynFlag1 = 0x02000000
    // Indicates that the object is a stub.
    DF_1_STUB DynFlag1 = 0x04000000
    // Indicates that the object is a position-independent executable.
    DF_1_PIE DynFlag1 = 0x08000000
    // Indicates that the object is a kernel module.
    DF_1_KMOD DynFlag1 = 0x10000000
    // Indicates that the object is a weak standard filter.
    DF_1_WEAKFILTER DynFlag1 = 0x20000000
    // Unused.
    DF_1_NOCOMMON DynFlag1 = 0x40000000
)</pre> <h3 id="DynFlag1.GoString">func (DynFlag1) <span>GoString</span>  <span title="Added in Go 1.21">1.21</span> </h3> <pre data-language="go">func (i DynFlag1) GoString() string</pre> <h3 id="DynFlag1.String">func (DynFlag1) <span>String</span>  <span title="Added in Go 1.21">1.21</span> </h3> <pre data-language="go">func (i DynFlag1) String() string</pre> <h2 id="DynTag">type <span>DynTag</span>  </h2> <p>Dyn.Tag </p>
<pre data-language="go">type DynTag int</pre> <pre data-language="go">const (
    DT_NULL         DynTag = 0  /* Terminating entry. */
    DT_NEEDED       DynTag = 1  /* String table offset of a needed shared library. */
    DT_PLTRELSZ     DynTag = 2  /* Total size in bytes of PLT relocations. */
    DT_PLTGOT       DynTag = 3  /* Processor-dependent address. */
    DT_HASH         DynTag = 4  /* Address of symbol hash table. */
    DT_STRTAB       DynTag = 5  /* Address of string table. */
    DT_SYMTAB       DynTag = 6  /* Address of symbol table. */
    DT_RELA         DynTag = 7  /* Address of ElfNN_Rela relocations. */
    DT_RELASZ       DynTag = 8  /* Total size of ElfNN_Rela relocations. */
    DT_RELAENT      DynTag = 9  /* Size of each ElfNN_Rela relocation entry. */
    DT_STRSZ        DynTag = 10 /* Size of string table. */
    DT_SYMENT       DynTag = 11 /* Size of each symbol table entry. */
    DT_INIT         DynTag = 12 /* Address of initialization function. */
    DT_FINI         DynTag = 13 /* Address of finalization function. */
    DT_SONAME       DynTag = 14 /* String table offset of shared object name. */
    DT_RPATH        DynTag = 15 /* String table offset of library path. [sup] */
    DT_SYMBOLIC     DynTag = 16 /* Indicates "symbolic" linking. [sup] */
    DT_REL          DynTag = 17 /* Address of ElfNN_Rel relocations. */
    DT_RELSZ        DynTag = 18 /* Total size of ElfNN_Rel relocations. */
    DT_RELENT       DynTag = 19 /* Size of each ElfNN_Rel relocation. */
    DT_PLTREL       DynTag = 20 /* Type of relocation used for PLT. */
    DT_DEBUG        DynTag = 21 /* Reserved (not used). */
    DT_TEXTREL      DynTag = 22 /* Indicates there may be relocations in non-writable segments. [sup] */
    DT_JMPREL       DynTag = 23 /* Address of PLT relocations. */
    DT_BIND_NOW     DynTag = 24 /* [sup] */
    DT_INIT_ARRAY   DynTag = 25 /* Address of the array of pointers to initialization functions */
    DT_FINI_ARRAY   DynTag = 26 /* Address of the array of pointers to termination functions */
    DT_INIT_ARRAYSZ DynTag = 27 /* Size in bytes of the array of initialization functions. */
    DT_FINI_ARRAYSZ DynTag = 28 /* Size in bytes of the array of termination functions. */
    DT_RUNPATH      DynTag = 29 /* String table offset of a null-terminated library search path string. */
    DT_FLAGS        DynTag = 30 /* Object specific flag values. */
    DT_ENCODING     DynTag = 32 /* Values greater than or equal to DT_ENCODING
       and less than DT_LOOS follow the rules for
       the interpretation of the d_un union
       as follows: even == 'd_ptr', even == 'd_val'
       or none */
    DT_PREINIT_ARRAY   DynTag = 32 /* Address of the array of pointers to pre-initialization functions. */
    DT_PREINIT_ARRAYSZ DynTag = 33 /* Size in bytes of the array of pre-initialization functions. */
    DT_SYMTAB_SHNDX    DynTag = 34 /* Address of SHT_SYMTAB_SHNDX section. */

    DT_LOOS DynTag = 0x6000000d /* First OS-specific */
    DT_HIOS DynTag = 0x6ffff000 /* Last OS-specific */

    DT_VALRNGLO       DynTag = 0x6ffffd00
    DT_GNU_PRELINKED  DynTag = 0x6ffffdf5
    DT_GNU_CONFLICTSZ DynTag = 0x6ffffdf6
    DT_GNU_LIBLISTSZ  DynTag = 0x6ffffdf7
    DT_CHECKSUM       DynTag = 0x6ffffdf8
    DT_PLTPADSZ       DynTag = 0x6ffffdf9
    DT_MOVEENT        DynTag = 0x6ffffdfa
    DT_MOVESZ         DynTag = 0x6ffffdfb
    DT_FEATURE        DynTag = 0x6ffffdfc
    DT_POSFLAG_1      DynTag = 0x6ffffdfd
    DT_SYMINSZ        DynTag = 0x6ffffdfe
    DT_SYMINENT       DynTag = 0x6ffffdff
    DT_VALRNGHI       DynTag = 0x6ffffdff

    DT_ADDRRNGLO    DynTag = 0x6ffffe00
    DT_GNU_HASH     DynTag = 0x6ffffef5
    DT_TLSDESC_PLT  DynTag = 0x6ffffef6
    DT_TLSDESC_GOT  DynTag = 0x6ffffef7
    DT_GNU_CONFLICT DynTag = 0x6ffffef8
    DT_GNU_LIBLIST  DynTag = 0x6ffffef9
    DT_CONFIG       DynTag = 0x6ffffefa
    DT_DEPAUDIT     DynTag = 0x6ffffefb
    DT_AUDIT        DynTag = 0x6ffffefc
    DT_PLTPAD       DynTag = 0x6ffffefd
    DT_MOVETAB      DynTag = 0x6ffffefe
    DT_SYMINFO      DynTag = 0x6ffffeff
    DT_ADDRRNGHI    DynTag = 0x6ffffeff

    DT_VERSYM     DynTag = 0x6ffffff0
    DT_RELACOUNT  DynTag = 0x6ffffff9
    DT_RELCOUNT   DynTag = 0x6ffffffa
    DT_FLAGS_1    DynTag = 0x6ffffffb
    DT_VERDEF     DynTag = 0x6ffffffc
    DT_VERDEFNUM  DynTag = 0x6ffffffd
    DT_VERNEED    DynTag = 0x6ffffffe
    DT_VERNEEDNUM DynTag = 0x6fffffff

    DT_LOPROC DynTag = 0x70000000 /* First processor-specific type. */

    DT_MIPS_RLD_VERSION           DynTag = 0x70000001
    DT_MIPS_TIME_STAMP            DynTag = 0x70000002
    DT_MIPS_ICHECKSUM             DynTag = 0x70000003
    DT_MIPS_IVERSION              DynTag = 0x70000004
    DT_MIPS_FLAGS                 DynTag = 0x70000005
    DT_MIPS_BASE_ADDRESS          DynTag = 0x70000006
    DT_MIPS_MSYM                  DynTag = 0x70000007
    DT_MIPS_CONFLICT              DynTag = 0x70000008
    DT_MIPS_LIBLIST               DynTag = 0x70000009
    DT_MIPS_LOCAL_GOTNO           DynTag = 0x7000000a
    DT_MIPS_CONFLICTNO            DynTag = 0x7000000b
    DT_MIPS_LIBLISTNO             DynTag = 0x70000010
    DT_MIPS_SYMTABNO              DynTag = 0x70000011
    DT_MIPS_UNREFEXTNO            DynTag = 0x70000012
    DT_MIPS_GOTSYM                DynTag = 0x70000013
    DT_MIPS_HIPAGENO              DynTag = 0x70000014
    DT_MIPS_RLD_MAP               DynTag = 0x70000016
    DT_MIPS_DELTA_CLASS           DynTag = 0x70000017
    DT_MIPS_DELTA_CLASS_NO        DynTag = 0x70000018
    DT_MIPS_DELTA_INSTANCE        DynTag = 0x70000019
    DT_MIPS_DELTA_INSTANCE_NO     DynTag = 0x7000001a
    DT_MIPS_DELTA_RELOC           DynTag = 0x7000001b
    DT_MIPS_DELTA_RELOC_NO        DynTag = 0x7000001c
    DT_MIPS_DELTA_SYM             DynTag = 0x7000001d
    DT_MIPS_DELTA_SYM_NO          DynTag = 0x7000001e
    DT_MIPS_DELTA_CLASSSYM        DynTag = 0x70000020
    DT_MIPS_DELTA_CLASSSYM_NO     DynTag = 0x70000021
    DT_MIPS_CXX_FLAGS             DynTag = 0x70000022
    DT_MIPS_PIXIE_INIT            DynTag = 0x70000023
    DT_MIPS_SYMBOL_LIB            DynTag = 0x70000024
    DT_MIPS_LOCALPAGE_GOTIDX      DynTag = 0x70000025
    DT_MIPS_LOCAL_GOTIDX          DynTag = 0x70000026
    DT_MIPS_HIDDEN_GOTIDX         DynTag = 0x70000027
    DT_MIPS_PROTECTED_GOTIDX      DynTag = 0x70000028
    DT_MIPS_OPTIONS               DynTag = 0x70000029
    DT_MIPS_INTERFACE             DynTag = 0x7000002a
    DT_MIPS_DYNSTR_ALIGN          DynTag = 0x7000002b
    DT_MIPS_INTERFACE_SIZE        DynTag = 0x7000002c
    DT_MIPS_RLD_TEXT_RESOLVE_ADDR DynTag = 0x7000002d
    DT_MIPS_PERF_SUFFIX           DynTag = 0x7000002e
    DT_MIPS_COMPACT_SIZE          DynTag = 0x7000002f
    DT_MIPS_GP_VALUE              DynTag = 0x70000030
    DT_MIPS_AUX_DYNAMIC           DynTag = 0x70000031
    DT_MIPS_PLTGOT                DynTag = 0x70000032
    DT_MIPS_RWPLT                 DynTag = 0x70000034
    DT_MIPS_RLD_MAP_REL           DynTag = 0x70000035

    DT_PPC_GOT DynTag = 0x70000000
    DT_PPC_OPT DynTag = 0x70000001

    DT_PPC64_GLINK DynTag = 0x70000000
    DT_PPC64_OPD   DynTag = 0x70000001
    DT_PPC64_OPDSZ DynTag = 0x70000002
    DT_PPC64_OPT   DynTag = 0x70000003

    DT_SPARC_REGISTER DynTag = 0x70000001

    DT_AUXILIARY DynTag = 0x7ffffffd
    DT_USED      DynTag = 0x7ffffffe
    DT_FILTER    DynTag = 0x7fffffff

    DT_HIPROC DynTag = 0x7fffffff /* Last processor-specific type. */
)</pre> <h3 id="DynTag.GoString">func (DynTag) <span>GoString</span>  </h3> <pre data-language="go">func (i DynTag) GoString() string</pre> <h3 id="DynTag.String">func (DynTag) <span>String</span>  </h3> <pre data-language="go">func (i DynTag) String() string</pre> <h2 id="File">type <span>File</span>  </h2> <p>A File represents an open ELF file. </p>
<pre data-language="go">type File struct {
    FileHeader
    Sections []*Section
    Progs    []*Prog
    // contains filtered or unexported fields
}
</pre> <h3 id="NewFile">func <span>NewFile</span>  </h3> <pre data-language="go">func NewFile(r io.ReaderAt) (*File, error)</pre> <p>NewFile creates a new <a href="#File">File</a> for accessing an ELF binary in an underlying reader. The ELF binary is expected to start at position 0 in the ReaderAt. </p>
<h3 id="Open">func <span>Open</span>  </h3> <pre data-language="go">func Open(name string) (*File, error)</pre> <p>Open opens the named file using <span>os.Open</span> and prepares it for use as an ELF binary. </p>
<h3 id="File.Close">func (*File) <span>Close</span>  </h3> <pre data-language="go">func (f *File) Close() error</pre> <p>Close closes the <a href="#File">File</a>. If the <a href="#File">File</a> was created using <a href="#NewFile">NewFile</a> directly instead of <a href="#Open">Open</a>, Close has no effect. </p>
<h3 id="File.DWARF">func (*File) <span>DWARF</span>  </h3> <pre data-language="go">func (f *File) DWARF() (*dwarf.Data, error)</pre> <h3 id="File.DynString">func (*File) <span>DynString</span>  <span title="Added in Go 1.1">1.1</span> </h3> <pre data-language="go">func (f *File) DynString(tag DynTag) ([]string, error)</pre> <p>DynString returns the strings listed for the given tag in the file's dynamic section. </p>
<p>The tag must be one that takes string values: <a href="#DT_NEEDED">DT_NEEDED</a>, <a href="#DT_SONAME">DT_SONAME</a>, <a href="#DT_RPATH">DT_RPATH</a>, or <a href="#DT_RUNPATH">DT_RUNPATH</a>. </p>
<h3 id="File.DynValue">func (*File) <span>DynValue</span>  <span title="Added in Go 1.21">1.21</span> </h3> <pre data-language="go">func (f *File) DynValue(tag DynTag) ([]uint64, error)</pre> <p>DynValue returns the values listed for the given tag in the file's dynamic section. </p>
<h3 id="File.DynamicSymbols">func (*File) <span>DynamicSymbols</span>  <span title="Added in Go 1.4">1.4</span> </h3> <pre data-language="go">func (f *File) DynamicSymbols() ([]Symbol, error)</pre> <p>DynamicSymbols returns the dynamic symbol table for f. The symbols will be listed in the order they appear in f. </p>
<p>If f has a symbol version table, the returned <a href="#File.Symbols">File.Symbols</a> will have initialized <a href="#Version">Version</a> and Library fields. </p>
<p>For compatibility with <a href="#File.Symbols">File.Symbols</a>, <a href="#File.DynamicSymbols">File.DynamicSymbols</a> omits the null symbol at index 0. After retrieving the symbols as symtab, an externally supplied index x corresponds to symtab[x-1], not symtab[x]. </p>
<h3 id="File.ImportedLibraries">func (*File) <span>ImportedLibraries</span>  </h3> <pre data-language="go">func (f *File) ImportedLibraries() ([]string, error)</pre> <p>ImportedLibraries returns the names of all libraries referred to by the binary f that are expected to be linked with the binary at dynamic link time. </p>
<h3 id="File.ImportedSymbols">func (*File) <span>ImportedSymbols</span>  </h3> <pre data-language="go">func (f *File) ImportedSymbols() ([]ImportedSymbol, error)</pre> <p>ImportedSymbols returns the names of all symbols referred to by the binary f that are expected to be satisfied by other libraries at dynamic load time. It does not return weak symbols. </p>
<h3 id="File.Section">func (*File) <span>Section</span>  </h3> <pre data-language="go">func (f *File) Section(name string) *Section</pre> <p>Section returns a section with the given name, or nil if no such section exists. </p>
<h3 id="File.SectionByType">func (*File) <span>SectionByType</span>  </h3> <pre data-language="go">func (f *File) SectionByType(typ SectionType) *Section</pre> <p>SectionByType returns the first section in f with the given type, or nil if there is no such section. </p>
<h3 id="File.Symbols">func (*File) <span>Symbols</span>  </h3> <pre data-language="go">func (f *File) Symbols() ([]Symbol, error)</pre> <p>Symbols returns the symbol table for f. The symbols will be listed in the order they appear in f. </p>
<p>For compatibility with Go 1.0, Symbols omits the null symbol at index 0. After retrieving the symbols as symtab, an externally supplied index x corresponds to symtab[x-1], not symtab[x]. </p>
<h2 id="FileHeader">type <span>FileHeader</span>  </h2> <p>A FileHeader represents an ELF file header. </p>
<pre data-language="go">type FileHeader struct {
    Class      Class
    Data       Data
    Version    Version
    OSABI      OSABI
    ABIVersion uint8
    ByteOrder  binary.ByteOrder
    Type       Type
    Machine    Machine
    Entry      uint64 // Go 1.1
}
</pre> <h2 id="FormatError">type <span>FormatError</span>  </h2> <pre data-language="go">type FormatError struct {
    // contains filtered or unexported fields
}
</pre> <h3 id="FormatError.Error">func (*FormatError) <span>Error</span>  </h3> <pre data-language="go">func (e *FormatError) Error() string</pre> <h2 id="Header32">type <span>Header32</span>  </h2> <p>ELF32 File header. </p>
<pre data-language="go">type Header32 struct {
    Ident     [EI_NIDENT]byte /* File identification. */
    Type      uint16          /* File type. */
    Machine   uint16          /* Machine architecture. */
    Version   uint32          /* ELF format version. */
    Entry     uint32          /* Entry point. */
    Phoff     uint32          /* Program header file offset. */
    Shoff     uint32          /* Section header file offset. */
    Flags     uint32          /* Architecture-specific flags. */
    Ehsize    uint16          /* Size of ELF header in bytes. */
    Phentsize uint16          /* Size of program header entry. */
    Phnum     uint16          /* Number of program header entries. */
    Shentsize uint16          /* Size of section header entry. */
    Shnum     uint16          /* Number of section header entries. */
    Shstrndx  uint16          /* Section name strings section. */
}
</pre> <h2 id="Header64">type <span>Header64</span>  </h2> <p>ELF64 file header. </p>
<pre data-language="go">type Header64 struct {
    Ident     [EI_NIDENT]byte /* File identification. */
    Type      uint16          /* File type. */
    Machine   uint16          /* Machine architecture. */
    Version   uint32          /* ELF format version. */
    Entry     uint64          /* Entry point. */
    Phoff     uint64          /* Program header file offset. */
    Shoff     uint64          /* Section header file offset. */
    Flags     uint32          /* Architecture-specific flags. */
    Ehsize    uint16          /* Size of ELF header in bytes. */
    Phentsize uint16          /* Size of program header entry. */
    Phnum     uint16          /* Number of program header entries. */
    Shentsize uint16          /* Size of section header entry. */
    Shnum     uint16          /* Number of section header entries. */
    Shstrndx  uint16          /* Section name strings section. */
}
</pre> <h2 id="ImportedSymbol">type <span>ImportedSymbol</span>  </h2> <pre data-language="go">type ImportedSymbol struct {
    Name    string
    Version string
    Library string
}
</pre> <h2 id="Machine">type <span>Machine</span>  </h2> <p>Machine is found in Header.Machine. </p>
<pre data-language="go">type Machine uint16</pre> <pre data-language="go">const (
    EM_NONE          Machine = 0   /* Unknown machine. */
    EM_M32           Machine = 1   /* AT&amp;T WE32100. */
    EM_SPARC         Machine = 2   /* Sun SPARC. */
    EM_386           Machine = 3   /* Intel i386. */
    EM_68K           Machine = 4   /* Motorola 68000. */
    EM_88K           Machine = 5   /* Motorola 88000. */
    EM_860           Machine = 7   /* Intel i860. */
    EM_MIPS          Machine = 8   /* MIPS R3000 Big-Endian only. */
    EM_S370          Machine = 9   /* IBM System/370. */
    EM_MIPS_RS3_LE   Machine = 10  /* MIPS R3000 Little-Endian. */
    EM_PARISC        Machine = 15  /* HP PA-RISC. */
    EM_VPP500        Machine = 17  /* Fujitsu VPP500. */
    EM_SPARC32PLUS   Machine = 18  /* SPARC v8plus. */
    EM_960           Machine = 19  /* Intel 80960. */
    EM_PPC           Machine = 20  /* PowerPC 32-bit. */
    EM_PPC64         Machine = 21  /* PowerPC 64-bit. */
    EM_S390          Machine = 22  /* IBM System/390. */
    EM_V800          Machine = 36  /* NEC V800. */
    EM_FR20          Machine = 37  /* Fujitsu FR20. */
    EM_RH32          Machine = 38  /* TRW RH-32. */
    EM_RCE           Machine = 39  /* Motorola RCE. */
    EM_ARM           Machine = 40  /* ARM. */
    EM_SH            Machine = 42  /* Hitachi SH. */
    EM_SPARCV9       Machine = 43  /* SPARC v9 64-bit. */
    EM_TRICORE       Machine = 44  /* Siemens TriCore embedded processor. */
    EM_ARC           Machine = 45  /* Argonaut RISC Core. */
    EM_H8_300        Machine = 46  /* Hitachi H8/300. */
    EM_H8_300H       Machine = 47  /* Hitachi H8/300H. */
    EM_H8S           Machine = 48  /* Hitachi H8S. */
    EM_H8_500        Machine = 49  /* Hitachi H8/500. */
    EM_IA_64         Machine = 50  /* Intel IA-64 Processor. */
    EM_MIPS_X        Machine = 51  /* Stanford MIPS-X. */
    EM_COLDFIRE      Machine = 52  /* Motorola ColdFire. */
    EM_68HC12        Machine = 53  /* Motorola M68HC12. */
    EM_MMA           Machine = 54  /* Fujitsu MMA. */
    EM_PCP           Machine = 55  /* Siemens PCP. */
    EM_NCPU          Machine = 56  /* Sony nCPU. */
    EM_NDR1          Machine = 57  /* Denso NDR1 microprocessor. */
    EM_STARCORE      Machine = 58  /* Motorola Star*Core processor. */
    EM_ME16          Machine = 59  /* Toyota ME16 processor. */
    EM_ST100         Machine = 60  /* STMicroelectronics ST100 processor. */
    EM_TINYJ         Machine = 61  /* Advanced Logic Corp. TinyJ processor. */
    EM_X86_64        Machine = 62  /* Advanced Micro Devices x86-64 */
    EM_PDSP          Machine = 63  /* Sony DSP Processor */
    EM_PDP10         Machine = 64  /* Digital Equipment Corp. PDP-10 */
    EM_PDP11         Machine = 65  /* Digital Equipment Corp. PDP-11 */
    EM_FX66          Machine = 66  /* Siemens FX66 microcontroller */
    EM_ST9PLUS       Machine = 67  /* STMicroelectronics ST9+ 8/16 bit microcontroller */
    EM_ST7           Machine = 68  /* STMicroelectronics ST7 8-bit microcontroller */
    EM_68HC16        Machine = 69  /* Motorola MC68HC16 Microcontroller */
    EM_68HC11        Machine = 70  /* Motorola MC68HC11 Microcontroller */
    EM_68HC08        Machine = 71  /* Motorola MC68HC08 Microcontroller */
    EM_68HC05        Machine = 72  /* Motorola MC68HC05 Microcontroller */
    EM_SVX           Machine = 73  /* Silicon Graphics SVx */
    EM_ST19          Machine = 74  /* STMicroelectronics ST19 8-bit microcontroller */
    EM_VAX           Machine = 75  /* Digital VAX */
    EM_CRIS          Machine = 76  /* Axis Communications 32-bit embedded processor */
    EM_JAVELIN       Machine = 77  /* Infineon Technologies 32-bit embedded processor */
    EM_FIREPATH      Machine = 78  /* Element 14 64-bit DSP Processor */
    EM_ZSP           Machine = 79  /* LSI Logic 16-bit DSP Processor */
    EM_MMIX          Machine = 80  /* Donald Knuth's educational 64-bit processor */
    EM_HUANY         Machine = 81  /* Harvard University machine-independent object files */
    EM_PRISM         Machine = 82  /* SiTera Prism */
    EM_AVR           Machine = 83  /* Atmel AVR 8-bit microcontroller */
    EM_FR30          Machine = 84  /* Fujitsu FR30 */
    EM_D10V          Machine = 85  /* Mitsubishi D10V */
    EM_D30V          Machine = 86  /* Mitsubishi D30V */
    EM_V850          Machine = 87  /* NEC v850 */
    EM_M32R          Machine = 88  /* Mitsubishi M32R */
    EM_MN10300       Machine = 89  /* Matsushita MN10300 */
    EM_MN10200       Machine = 90  /* Matsushita MN10200 */
    EM_PJ            Machine = 91  /* picoJava */
    EM_OPENRISC      Machine = 92  /* OpenRISC 32-bit embedded processor */
    EM_ARC_COMPACT   Machine = 93  /* ARC International ARCompact processor (old spelling/synonym: EM_ARC_A5) */
    EM_XTENSA        Machine = 94  /* Tensilica Xtensa Architecture */
    EM_VIDEOCORE     Machine = 95  /* Alphamosaic VideoCore processor */
    EM_TMM_GPP       Machine = 96  /* Thompson Multimedia General Purpose Processor */
    EM_NS32K         Machine = 97  /* National Semiconductor 32000 series */
    EM_TPC           Machine = 98  /* Tenor Network TPC processor */
    EM_SNP1K         Machine = 99  /* Trebia SNP 1000 processor */
    EM_ST200         Machine = 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
    EM_IP2K          Machine = 101 /* Ubicom IP2xxx microcontroller family */
    EM_MAX           Machine = 102 /* MAX Processor */
    EM_CR            Machine = 103 /* National Semiconductor CompactRISC microprocessor */
    EM_F2MC16        Machine = 104 /* Fujitsu F2MC16 */
    EM_MSP430        Machine = 105 /* Texas Instruments embedded microcontroller msp430 */
    EM_BLACKFIN      Machine = 106 /* Analog Devices Blackfin (DSP) processor */
    EM_SE_C33        Machine = 107 /* S1C33 Family of Seiko Epson processors */
    EM_SEP           Machine = 108 /* Sharp embedded microprocessor */
    EM_ARCA          Machine = 109 /* Arca RISC Microprocessor */
    EM_UNICORE       Machine = 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */
    EM_EXCESS        Machine = 111 /* eXcess: 16/32/64-bit configurable embedded CPU */
    EM_DXP           Machine = 112 /* Icera Semiconductor Inc. Deep Execution Processor */
    EM_ALTERA_NIOS2  Machine = 113 /* Altera Nios II soft-core processor */
    EM_CRX           Machine = 114 /* National Semiconductor CompactRISC CRX microprocessor */
    EM_XGATE         Machine = 115 /* Motorola XGATE embedded processor */
    EM_C166          Machine = 116 /* Infineon C16x/XC16x processor */
    EM_M16C          Machine = 117 /* Renesas M16C series microprocessors */
    EM_DSPIC30F      Machine = 118 /* Microchip Technology dsPIC30F Digital Signal Controller */
    EM_CE            Machine = 119 /* Freescale Communication Engine RISC core */
    EM_M32C          Machine = 120 /* Renesas M32C series microprocessors */
    EM_TSK3000       Machine = 131 /* Altium TSK3000 core */
    EM_RS08          Machine = 132 /* Freescale RS08 embedded processor */
    EM_SHARC         Machine = 133 /* Analog Devices SHARC family of 32-bit DSP processors */
    EM_ECOG2         Machine = 134 /* Cyan Technology eCOG2 microprocessor */
    EM_SCORE7        Machine = 135 /* Sunplus S+core7 RISC processor */
    EM_DSP24         Machine = 136 /* New Japan Radio (NJR) 24-bit DSP Processor */
    EM_VIDEOCORE3    Machine = 137 /* Broadcom VideoCore III processor */
    EM_LATTICEMICO32 Machine = 138 /* RISC processor for Lattice FPGA architecture */
    EM_SE_C17        Machine = 139 /* Seiko Epson C17 family */
    EM_TI_C6000      Machine = 140 /* The Texas Instruments TMS320C6000 DSP family */
    EM_TI_C2000      Machine = 141 /* The Texas Instruments TMS320C2000 DSP family */
    EM_TI_C5500      Machine = 142 /* The Texas Instruments TMS320C55x DSP family */
    EM_TI_ARP32      Machine = 143 /* Texas Instruments Application Specific RISC Processor, 32bit fetch */
    EM_TI_PRU        Machine = 144 /* Texas Instruments Programmable Realtime Unit */
    EM_MMDSP_PLUS    Machine = 160 /* STMicroelectronics 64bit VLIW Data Signal Processor */
    EM_CYPRESS_M8C   Machine = 161 /* Cypress M8C microprocessor */
    EM_R32C          Machine = 162 /* Renesas R32C series microprocessors */
    EM_TRIMEDIA      Machine = 163 /* NXP Semiconductors TriMedia architecture family */
    EM_QDSP6         Machine = 164 /* QUALCOMM DSP6 Processor */
    EM_8051          Machine = 165 /* Intel 8051 and variants */
    EM_STXP7X        Machine = 166 /* STMicroelectronics STxP7x family of configurable and extensible RISC processors */
    EM_NDS32         Machine = 167 /* Andes Technology compact code size embedded RISC processor family */
    EM_ECOG1         Machine = 168 /* Cyan Technology eCOG1X family */
    EM_ECOG1X        Machine = 168 /* Cyan Technology eCOG1X family */
    EM_MAXQ30        Machine = 169 /* Dallas Semiconductor MAXQ30 Core Micro-controllers */
    EM_XIMO16        Machine = 170 /* New Japan Radio (NJR) 16-bit DSP Processor */
    EM_MANIK         Machine = 171 /* M2000 Reconfigurable RISC Microprocessor */
    EM_CRAYNV2       Machine = 172 /* Cray Inc. NV2 vector architecture */
    EM_RX            Machine = 173 /* Renesas RX family */
    EM_METAG         Machine = 174 /* Imagination Technologies META processor architecture */
    EM_MCST_ELBRUS   Machine = 175 /* MCST Elbrus general purpose hardware architecture */
    EM_ECOG16        Machine = 176 /* Cyan Technology eCOG16 family */
    EM_CR16          Machine = 177 /* National Semiconductor CompactRISC CR16 16-bit microprocessor */
    EM_ETPU          Machine = 178 /* Freescale Extended Time Processing Unit */
    EM_SLE9X         Machine = 179 /* Infineon Technologies SLE9X core */
    EM_L10M          Machine = 180 /* Intel L10M */
    EM_K10M          Machine = 181 /* Intel K10M */
    EM_AARCH64       Machine = 183 /* ARM 64-bit Architecture (AArch64) */
    EM_AVR32         Machine = 185 /* Atmel Corporation 32-bit microprocessor family */
    EM_STM8          Machine = 186 /* STMicroeletronics STM8 8-bit microcontroller */
    EM_TILE64        Machine = 187 /* Tilera TILE64 multicore architecture family */
    EM_TILEPRO       Machine = 188 /* Tilera TILEPro multicore architecture family */
    EM_MICROBLAZE    Machine = 189 /* Xilinx MicroBlaze 32-bit RISC soft processor core */
    EM_CUDA          Machine = 190 /* NVIDIA CUDA architecture */
    EM_TILEGX        Machine = 191 /* Tilera TILE-Gx multicore architecture family */
    EM_CLOUDSHIELD   Machine = 192 /* CloudShield architecture family */
    EM_COREA_1ST     Machine = 193 /* KIPO-KAIST Core-A 1st generation processor family */
    EM_COREA_2ND     Machine = 194 /* KIPO-KAIST Core-A 2nd generation processor family */
    EM_ARC_COMPACT2  Machine = 195 /* Synopsys ARCompact V2 */
    EM_OPEN8         Machine = 196 /* Open8 8-bit RISC soft processor core */
    EM_RL78          Machine = 197 /* Renesas RL78 family */
    EM_VIDEOCORE5    Machine = 198 /* Broadcom VideoCore V processor */
    EM_78KOR         Machine = 199 /* Renesas 78KOR family */
    EM_56800EX       Machine = 200 /* Freescale 56800EX Digital Signal Controller (DSC) */
    EM_BA1           Machine = 201 /* Beyond BA1 CPU architecture */
    EM_BA2           Machine = 202 /* Beyond BA2 CPU architecture */
    EM_XCORE         Machine = 203 /* XMOS xCORE processor family */
    EM_MCHP_PIC      Machine = 204 /* Microchip 8-bit PIC(r) family */
    EM_INTEL205      Machine = 205 /* Reserved by Intel */
    EM_INTEL206      Machine = 206 /* Reserved by Intel */
    EM_INTEL207      Machine = 207 /* Reserved by Intel */
    EM_INTEL208      Machine = 208 /* Reserved by Intel */
    EM_INTEL209      Machine = 209 /* Reserved by Intel */
    EM_KM32          Machine = 210 /* KM211 KM32 32-bit processor */
    EM_KMX32         Machine = 211 /* KM211 KMX32 32-bit processor */
    EM_KMX16         Machine = 212 /* KM211 KMX16 16-bit processor */
    EM_KMX8          Machine = 213 /* KM211 KMX8 8-bit processor */
    EM_KVARC         Machine = 214 /* KM211 KVARC processor */
    EM_CDP           Machine = 215 /* Paneve CDP architecture family */
    EM_COGE          Machine = 216 /* Cognitive Smart Memory Processor */
    EM_COOL          Machine = 217 /* Bluechip Systems CoolEngine */
    EM_NORC          Machine = 218 /* Nanoradio Optimized RISC */
    EM_CSR_KALIMBA   Machine = 219 /* CSR Kalimba architecture family */
    EM_Z80           Machine = 220 /* Zilog Z80 */
    EM_VISIUM        Machine = 221 /* Controls and Data Services VISIUMcore processor */
    EM_FT32          Machine = 222 /* FTDI Chip FT32 high performance 32-bit RISC architecture */
    EM_MOXIE         Machine = 223 /* Moxie processor family */
    EM_AMDGPU        Machine = 224 /* AMD GPU architecture */
    EM_RISCV         Machine = 243 /* RISC-V */
    EM_LANAI         Machine = 244 /* Lanai 32-bit processor */
    EM_BPF           Machine = 247 /* Linux BPF – in-kernel virtual machine */
    EM_LOONGARCH     Machine = 258 /* LoongArch */

    /* Non-standard or deprecated. */
    EM_486         Machine = 6      /* Intel i486. */
    EM_MIPS_RS4_BE Machine = 10     /* MIPS R4000 Big-Endian */
    EM_ALPHA_STD   Machine = 41     /* Digital Alpha (standard value). */
    EM_ALPHA       Machine = 0x9026 /* Alpha (written in the absence of an ABI) */
)</pre> <h3 id="Machine.GoString">func (Machine) <span>GoString</span>  </h3> <pre data-language="go">func (i Machine) GoString() string</pre> <h3 id="Machine.String">func (Machine) <span>String</span>  </h3> <pre data-language="go">func (i Machine) String() string</pre> <h2 id="NType">type <span>NType</span>  </h2> <p>NType values; used in core files. </p>
<pre data-language="go">type NType int</pre> <pre data-language="go">const (
    NT_PRSTATUS NType = 1 /* Process status. */
    NT_FPREGSET NType = 2 /* Floating point registers. */
    NT_PRPSINFO NType = 3 /* Process state info. */
)</pre> <h3 id="NType.GoString">func (NType) <span>GoString</span>  </h3> <pre data-language="go">func (i NType) GoString() string</pre> <h3 id="NType.String">func (NType) <span>String</span>  </h3> <pre data-language="go">func (i NType) String() string</pre> <h2 id="OSABI">type <span>OSABI</span>  </h2> <p>OSABI is found in Header.Ident[EI_OSABI] and Header.OSABI. </p>
<pre data-language="go">type OSABI byte</pre> <pre data-language="go">const (
    ELFOSABI_NONE       OSABI = 0   /* UNIX System V ABI */
    ELFOSABI_HPUX       OSABI = 1   /* HP-UX operating system */
    ELFOSABI_NETBSD     OSABI = 2   /* NetBSD */
    ELFOSABI_LINUX      OSABI = 3   /* Linux */
    ELFOSABI_HURD       OSABI = 4   /* Hurd */
    ELFOSABI_86OPEN     OSABI = 5   /* 86Open common IA32 ABI */
    ELFOSABI_SOLARIS    OSABI = 6   /* Solaris */
    ELFOSABI_AIX        OSABI = 7   /* AIX */
    ELFOSABI_IRIX       OSABI = 8   /* IRIX */
    ELFOSABI_FREEBSD    OSABI = 9   /* FreeBSD */
    ELFOSABI_TRU64      OSABI = 10  /* TRU64 UNIX */
    ELFOSABI_MODESTO    OSABI = 11  /* Novell Modesto */
    ELFOSABI_OPENBSD    OSABI = 12  /* OpenBSD */
    ELFOSABI_OPENVMS    OSABI = 13  /* Open VMS */
    ELFOSABI_NSK        OSABI = 14  /* HP Non-Stop Kernel */
    ELFOSABI_AROS       OSABI = 15  /* Amiga Research OS */
    ELFOSABI_FENIXOS    OSABI = 16  /* The FenixOS highly scalable multi-core OS */
    ELFOSABI_CLOUDABI   OSABI = 17  /* Nuxi CloudABI */
    ELFOSABI_ARM        OSABI = 97  /* ARM */
    ELFOSABI_STANDALONE OSABI = 255 /* Standalone (embedded) application */
)</pre> <h3 id="OSABI.GoString">func (OSABI) <span>GoString</span>  </h3> <pre data-language="go">func (i OSABI) GoString() string</pre> <h3 id="OSABI.String">func (OSABI) <span>String</span>  </h3> <pre data-language="go">func (i OSABI) String() string</pre> <h2 id="Prog">type <span>Prog</span>  </h2> <p>A Prog represents a single ELF program header in an ELF binary. </p>
<pre data-language="go">type Prog struct {
    ProgHeader

    // Embed ReaderAt for ReadAt method.
    // Do not embed SectionReader directly
    // to avoid having Read and Seek.
    // If a client wants Read and Seek it must use
    // Open() to avoid fighting over the seek offset
    // with other clients.
    io.ReaderAt
    // contains filtered or unexported fields
}
</pre> <h3 id="Prog.Open">func (*Prog) <span>Open</span>  </h3> <pre data-language="go">func (p *Prog) Open() io.ReadSeeker</pre> <p>Open returns a new ReadSeeker reading the ELF program body. </p>
<h2 id="Prog32">type <span>Prog32</span>  </h2> <p>ELF32 Program header. </p>
<pre data-language="go">type Prog32 struct {
    Type   uint32 /* Entry type. */
    Off    uint32 /* File offset of contents. */
    Vaddr  uint32 /* Virtual address in memory image. */
    Paddr  uint32 /* Physical address (not used). */
    Filesz uint32 /* Size of contents in file. */
    Memsz  uint32 /* Size of contents in memory. */
    Flags  uint32 /* Access permission flags. */
    Align  uint32 /* Alignment in memory and file. */
}
</pre> <h2 id="Prog64">type <span>Prog64</span>  </h2> <p>ELF64 Program header. </p>
<pre data-language="go">type Prog64 struct {
    Type   uint32 /* Entry type. */
    Flags  uint32 /* Access permission flags. */
    Off    uint64 /* File offset of contents. */
    Vaddr  uint64 /* Virtual address in memory image. */
    Paddr  uint64 /* Physical address (not used). */
    Filesz uint64 /* Size of contents in file. */
    Memsz  uint64 /* Size of contents in memory. */
    Align  uint64 /* Alignment in memory and file. */
}
</pre> <h2 id="ProgFlag">type <span>ProgFlag</span>  </h2> <p>Prog.Flag </p>
<pre data-language="go">type ProgFlag uint32</pre> <pre data-language="go">const (
    PF_X        ProgFlag = 0x1        /* Executable. */
    PF_W        ProgFlag = 0x2        /* Writable. */
    PF_R        ProgFlag = 0x4        /* Readable. */
    PF_MASKOS   ProgFlag = 0x0ff00000 /* Operating system-specific. */
    PF_MASKPROC ProgFlag = 0xf0000000 /* Processor-specific. */
)</pre> <h3 id="ProgFlag.GoString">func (ProgFlag) <span>GoString</span>  </h3> <pre data-language="go">func (i ProgFlag) GoString() string</pre> <h3 id="ProgFlag.String">func (ProgFlag) <span>String</span>  </h3> <pre data-language="go">func (i ProgFlag) String() string</pre> <h2 id="ProgHeader">type <span>ProgHeader</span>  </h2> <p>A ProgHeader represents a single ELF program header. </p>
<pre data-language="go">type ProgHeader struct {
    Type   ProgType
    Flags  ProgFlag
    Off    uint64
    Vaddr  uint64
    Paddr  uint64
    Filesz uint64
    Memsz  uint64
    Align  uint64
}
</pre> <h2 id="ProgType">type <span>ProgType</span>  </h2> <p>Prog.Type </p>
<pre data-language="go">type ProgType int</pre> <pre data-language="go">const (
    PT_NULL    ProgType = 0 /* Unused entry. */
    PT_LOAD    ProgType = 1 /* Loadable segment. */
    PT_DYNAMIC ProgType = 2 /* Dynamic linking information segment. */
    PT_INTERP  ProgType = 3 /* Pathname of interpreter. */
    PT_NOTE    ProgType = 4 /* Auxiliary information. */
    PT_SHLIB   ProgType = 5 /* Reserved (not used). */
    PT_PHDR    ProgType = 6 /* Location of program header itself. */
    PT_TLS     ProgType = 7 /* Thread local storage segment */

    PT_LOOS ProgType = 0x60000000 /* First OS-specific. */

    PT_GNU_EH_FRAME ProgType = 0x6474e550 /* Frame unwind information */
    PT_GNU_STACK    ProgType = 0x6474e551 /* Stack flags */
    PT_GNU_RELRO    ProgType = 0x6474e552 /* Read only after relocs */
    PT_GNU_PROPERTY ProgType = 0x6474e553 /* GNU property */
    PT_GNU_MBIND_LO ProgType = 0x6474e555 /* Mbind segments start */
    PT_GNU_MBIND_HI ProgType = 0x6474f554 /* Mbind segments finish */

    PT_PAX_FLAGS ProgType = 0x65041580 /* PAX flags */

    PT_OPENBSD_RANDOMIZE ProgType = 0x65a3dbe6 /* Random data */
    PT_OPENBSD_WXNEEDED  ProgType = 0x65a3dbe7 /* W^X violations */
    PT_OPENBSD_BOOTDATA  ProgType = 0x65a41be6 /* Boot arguments */

    PT_SUNW_EH_FRAME ProgType = 0x6474e550 /* Frame unwind information */
    PT_SUNWSTACK     ProgType = 0x6ffffffb /* Stack segment */

    PT_HIOS ProgType = 0x6fffffff /* Last OS-specific. */

    PT_LOPROC ProgType = 0x70000000 /* First processor-specific type. */

    PT_ARM_ARCHEXT ProgType = 0x70000000 /* Architecture compatibility */
    PT_ARM_EXIDX   ProgType = 0x70000001 /* Exception unwind tables */

    PT_AARCH64_ARCHEXT ProgType = 0x70000000 /* Architecture compatibility */
    PT_AARCH64_UNWIND  ProgType = 0x70000001 /* Exception unwind tables */

    PT_MIPS_REGINFO  ProgType = 0x70000000 /* Register usage */
    PT_MIPS_RTPROC   ProgType = 0x70000001 /* Runtime procedures */
    PT_MIPS_OPTIONS  ProgType = 0x70000002 /* Options */
    PT_MIPS_ABIFLAGS ProgType = 0x70000003 /* ABI flags */

    PT_S390_PGSTE ProgType = 0x70000000 /* 4k page table size */

    PT_HIPROC ProgType = 0x7fffffff /* Last processor-specific type. */
)</pre> <h3 id="ProgType.GoString">func (ProgType) <span>GoString</span>  </h3> <pre data-language="go">func (i ProgType) GoString() string</pre> <h3 id="ProgType.String">func (ProgType) <span>String</span>  </h3> <pre data-language="go">func (i ProgType) String() string</pre> <h2 id="R_386">type <span>R_386</span>  </h2> <p>Relocation types for 386. </p>
<pre data-language="go">type R_386 int</pre> <pre data-language="go">const (
    R_386_NONE          R_386 = 0  /* No relocation. */
    R_386_32            R_386 = 1  /* Add symbol value. */
    R_386_PC32          R_386 = 2  /* Add PC-relative symbol value. */
    R_386_GOT32         R_386 = 3  /* Add PC-relative GOT offset. */
    R_386_PLT32         R_386 = 4  /* Add PC-relative PLT offset. */
    R_386_COPY          R_386 = 5  /* Copy data from shared object. */
    R_386_GLOB_DAT      R_386 = 6  /* Set GOT entry to data address. */
    R_386_JMP_SLOT      R_386 = 7  /* Set GOT entry to code address. */
    R_386_RELATIVE      R_386 = 8  /* Add load address of shared object. */
    R_386_GOTOFF        R_386 = 9  /* Add GOT-relative symbol address. */
    R_386_GOTPC         R_386 = 10 /* Add PC-relative GOT table address. */
    R_386_32PLT         R_386 = 11
    R_386_TLS_TPOFF     R_386 = 14 /* Negative offset in static TLS block */
    R_386_TLS_IE        R_386 = 15 /* Absolute address of GOT for -ve static TLS */
    R_386_TLS_GOTIE     R_386 = 16 /* GOT entry for negative static TLS block */
    R_386_TLS_LE        R_386 = 17 /* Negative offset relative to static TLS */
    R_386_TLS_GD        R_386 = 18 /* 32 bit offset to GOT (index,off) pair */
    R_386_TLS_LDM       R_386 = 19 /* 32 bit offset to GOT (index,zero) pair */
    R_386_16            R_386 = 20
    R_386_PC16          R_386 = 21
    R_386_8             R_386 = 22
    R_386_PC8           R_386 = 23
    R_386_TLS_GD_32     R_386 = 24 /* 32 bit offset to GOT (index,off) pair */
    R_386_TLS_GD_PUSH   R_386 = 25 /* pushl instruction for Sun ABI GD sequence */
    R_386_TLS_GD_CALL   R_386 = 26 /* call instruction for Sun ABI GD sequence */
    R_386_TLS_GD_POP    R_386 = 27 /* popl instruction for Sun ABI GD sequence */
    R_386_TLS_LDM_32    R_386 = 28 /* 32 bit offset to GOT (index,zero) pair */
    R_386_TLS_LDM_PUSH  R_386 = 29 /* pushl instruction for Sun ABI LD sequence */
    R_386_TLS_LDM_CALL  R_386 = 30 /* call instruction for Sun ABI LD sequence */
    R_386_TLS_LDM_POP   R_386 = 31 /* popl instruction for Sun ABI LD sequence */
    R_386_TLS_LDO_32    R_386 = 32 /* 32 bit offset from start of TLS block */
    R_386_TLS_IE_32     R_386 = 33 /* 32 bit offset to GOT static TLS offset entry */
    R_386_TLS_LE_32     R_386 = 34 /* 32 bit offset within static TLS block */
    R_386_TLS_DTPMOD32  R_386 = 35 /* GOT entry containing TLS index */
    R_386_TLS_DTPOFF32  R_386 = 36 /* GOT entry containing TLS offset */
    R_386_TLS_TPOFF32   R_386 = 37 /* GOT entry of -ve static TLS offset */
    R_386_SIZE32        R_386 = 38
    R_386_TLS_GOTDESC   R_386 = 39
    R_386_TLS_DESC_CALL R_386 = 40
    R_386_TLS_DESC      R_386 = 41
    R_386_IRELATIVE     R_386 = 42
    R_386_GOT32X        R_386 = 43
)</pre> <h3 id="R_386.GoString">func (R_386) <span>GoString</span>  </h3> <pre data-language="go">func (i R_386) GoString() string</pre> <h3 id="R_386.String">func (R_386) <span>String</span>  </h3> <pre data-language="go">func (i R_386) String() string</pre> <h2 id="R_390">type <span>R_390</span>  <span title="Added in Go 1.7">1.7</span> </h2> <p>Relocation types for s390x processors. </p>
<pre data-language="go">type R_390 int</pre> <pre data-language="go">const (
    R_390_NONE        R_390 = 0
    R_390_8           R_390 = 1
    R_390_12          R_390 = 2
    R_390_16          R_390 = 3
    R_390_32          R_390 = 4
    R_390_PC32        R_390 = 5
    R_390_GOT12       R_390 = 6
    R_390_GOT32       R_390 = 7
    R_390_PLT32       R_390 = 8
    R_390_COPY        R_390 = 9
    R_390_GLOB_DAT    R_390 = 10
    R_390_JMP_SLOT    R_390 = 11
    R_390_RELATIVE    R_390 = 12
    R_390_GOTOFF      R_390 = 13
    R_390_GOTPC       R_390 = 14
    R_390_GOT16       R_390 = 15
    R_390_PC16        R_390 = 16
    R_390_PC16DBL     R_390 = 17
    R_390_PLT16DBL    R_390 = 18
    R_390_PC32DBL     R_390 = 19
    R_390_PLT32DBL    R_390 = 20
    R_390_GOTPCDBL    R_390 = 21
    R_390_64          R_390 = 22
    R_390_PC64        R_390 = 23
    R_390_GOT64       R_390 = 24
    R_390_PLT64       R_390 = 25
    R_390_GOTENT      R_390 = 26
    R_390_GOTOFF16    R_390 = 27
    R_390_GOTOFF64    R_390 = 28
    R_390_GOTPLT12    R_390 = 29
    R_390_GOTPLT16    R_390 = 30
    R_390_GOTPLT32    R_390 = 31
    R_390_GOTPLT64    R_390 = 32
    R_390_GOTPLTENT   R_390 = 33
    R_390_GOTPLTOFF16 R_390 = 34
    R_390_GOTPLTOFF32 R_390 = 35
    R_390_GOTPLTOFF64 R_390 = 36
    R_390_TLS_LOAD    R_390 = 37
    R_390_TLS_GDCALL  R_390 = 38
    R_390_TLS_LDCALL  R_390 = 39
    R_390_TLS_GD32    R_390 = 40
    R_390_TLS_GD64    R_390 = 41
    R_390_TLS_GOTIE12 R_390 = 42
    R_390_TLS_GOTIE32 R_390 = 43
    R_390_TLS_GOTIE64 R_390 = 44
    R_390_TLS_LDM32   R_390 = 45
    R_390_TLS_LDM64   R_390 = 46
    R_390_TLS_IE32    R_390 = 47
    R_390_TLS_IE64    R_390 = 48
    R_390_TLS_IEENT   R_390 = 49
    R_390_TLS_LE32    R_390 = 50
    R_390_TLS_LE64    R_390 = 51
    R_390_TLS_LDO32   R_390 = 52
    R_390_TLS_LDO64   R_390 = 53
    R_390_TLS_DTPMOD  R_390 = 54
    R_390_TLS_DTPOFF  R_390 = 55
    R_390_TLS_TPOFF   R_390 = 56
    R_390_20          R_390 = 57
    R_390_GOT20       R_390 = 58
    R_390_GOTPLT20    R_390 = 59
    R_390_TLS_GOTIE20 R_390 = 60
)</pre> <h3 id="R_390.GoString">func (R_390) <span>GoString</span>  <span title="Added in Go 1.7">1.7</span> </h3> <pre data-language="go">func (i R_390) GoString() string</pre> <h3 id="R_390.String">func (R_390) <span>String</span>  <span title="Added in Go 1.7">1.7</span> </h3> <pre data-language="go">func (i R_390) String() string</pre> <h2 id="R_AARCH64">type <span>R_AARCH64</span>  <span title="Added in Go 1.4">1.4</span> </h2> <p>Relocation types for AArch64 (aka arm64) </p>
<pre data-language="go">type R_AARCH64 int</pre> <pre data-language="go">const (
    R_AARCH64_NONE                            R_AARCH64 = 0
    R_AARCH64_P32_ABS32                       R_AARCH64 = 1
    R_AARCH64_P32_ABS16                       R_AARCH64 = 2
    R_AARCH64_P32_PREL32                      R_AARCH64 = 3
    R_AARCH64_P32_PREL16                      R_AARCH64 = 4
    R_AARCH64_P32_MOVW_UABS_G0                R_AARCH64 = 5
    R_AARCH64_P32_MOVW_UABS_G0_NC             R_AARCH64 = 6
    R_AARCH64_P32_MOVW_UABS_G1                R_AARCH64 = 7
    R_AARCH64_P32_MOVW_SABS_G0                R_AARCH64 = 8
    R_AARCH64_P32_LD_PREL_LO19                R_AARCH64 = 9
    R_AARCH64_P32_ADR_PREL_LO21               R_AARCH64 = 10
    R_AARCH64_P32_ADR_PREL_PG_HI21            R_AARCH64 = 11
    R_AARCH64_P32_ADD_ABS_LO12_NC             R_AARCH64 = 12
    R_AARCH64_P32_LDST8_ABS_LO12_NC           R_AARCH64 = 13
    R_AARCH64_P32_LDST16_ABS_LO12_NC          R_AARCH64 = 14
    R_AARCH64_P32_LDST32_ABS_LO12_NC          R_AARCH64 = 15
    R_AARCH64_P32_LDST64_ABS_LO12_NC          R_AARCH64 = 16
    R_AARCH64_P32_LDST128_ABS_LO12_NC         R_AARCH64 = 17
    R_AARCH64_P32_TSTBR14                     R_AARCH64 = 18
    R_AARCH64_P32_CONDBR19                    R_AARCH64 = 19
    R_AARCH64_P32_JUMP26                      R_AARCH64 = 20
    R_AARCH64_P32_CALL26                      R_AARCH64 = 21
    R_AARCH64_P32_GOT_LD_PREL19               R_AARCH64 = 25
    R_AARCH64_P32_ADR_GOT_PAGE                R_AARCH64 = 26
    R_AARCH64_P32_LD32_GOT_LO12_NC            R_AARCH64 = 27
    R_AARCH64_P32_TLSGD_ADR_PAGE21            R_AARCH64 = 81
    R_AARCH64_P32_TLSGD_ADD_LO12_NC           R_AARCH64 = 82
    R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21   R_AARCH64 = 103
    R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 104
    R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19    R_AARCH64 = 105
    R_AARCH64_P32_TLSLE_MOVW_TPREL_G1         R_AARCH64 = 106
    R_AARCH64_P32_TLSLE_MOVW_TPREL_G0         R_AARCH64 = 107
    R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC      R_AARCH64 = 108
    R_AARCH64_P32_TLSLE_ADD_TPREL_HI12        R_AARCH64 = 109
    R_AARCH64_P32_TLSLE_ADD_TPREL_LO12        R_AARCH64 = 110
    R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC     R_AARCH64 = 111
    R_AARCH64_P32_TLSDESC_LD_PREL19           R_AARCH64 = 122
    R_AARCH64_P32_TLSDESC_ADR_PREL21          R_AARCH64 = 123
    R_AARCH64_P32_TLSDESC_ADR_PAGE21          R_AARCH64 = 124
    R_AARCH64_P32_TLSDESC_LD32_LO12_NC        R_AARCH64 = 125
    R_AARCH64_P32_TLSDESC_ADD_LO12_NC         R_AARCH64 = 126
    R_AARCH64_P32_TLSDESC_CALL                R_AARCH64 = 127
    R_AARCH64_P32_COPY                        R_AARCH64 = 180
    R_AARCH64_P32_GLOB_DAT                    R_AARCH64 = 181
    R_AARCH64_P32_JUMP_SLOT                   R_AARCH64 = 182
    R_AARCH64_P32_RELATIVE                    R_AARCH64 = 183
    R_AARCH64_P32_TLS_DTPMOD                  R_AARCH64 = 184
    R_AARCH64_P32_TLS_DTPREL                  R_AARCH64 = 185
    R_AARCH64_P32_TLS_TPREL                   R_AARCH64 = 186
    R_AARCH64_P32_TLSDESC                     R_AARCH64 = 187
    R_AARCH64_P32_IRELATIVE                   R_AARCH64 = 188
    R_AARCH64_NULL                            R_AARCH64 = 256
    R_AARCH64_ABS64                           R_AARCH64 = 257
    R_AARCH64_ABS32                           R_AARCH64 = 258
    R_AARCH64_ABS16                           R_AARCH64 = 259
    R_AARCH64_PREL64                          R_AARCH64 = 260
    R_AARCH64_PREL32                          R_AARCH64 = 261
    R_AARCH64_PREL16                          R_AARCH64 = 262
    R_AARCH64_MOVW_UABS_G0                    R_AARCH64 = 263
    R_AARCH64_MOVW_UABS_G0_NC                 R_AARCH64 = 264
    R_AARCH64_MOVW_UABS_G1                    R_AARCH64 = 265
    R_AARCH64_MOVW_UABS_G1_NC                 R_AARCH64 = 266
    R_AARCH64_MOVW_UABS_G2                    R_AARCH64 = 267
    R_AARCH64_MOVW_UABS_G2_NC                 R_AARCH64 = 268
    R_AARCH64_MOVW_UABS_G3                    R_AARCH64 = 269
    R_AARCH64_MOVW_SABS_G0                    R_AARCH64 = 270
    R_AARCH64_MOVW_SABS_G1                    R_AARCH64 = 271
    R_AARCH64_MOVW_SABS_G2                    R_AARCH64 = 272
    R_AARCH64_LD_PREL_LO19                    R_AARCH64 = 273
    R_AARCH64_ADR_PREL_LO21                   R_AARCH64 = 274
    R_AARCH64_ADR_PREL_PG_HI21                R_AARCH64 = 275
    R_AARCH64_ADR_PREL_PG_HI21_NC             R_AARCH64 = 276
    R_AARCH64_ADD_ABS_LO12_NC                 R_AARCH64 = 277
    R_AARCH64_LDST8_ABS_LO12_NC               R_AARCH64 = 278
    R_AARCH64_TSTBR14                         R_AARCH64 = 279
    R_AARCH64_CONDBR19                        R_AARCH64 = 280
    R_AARCH64_JUMP26                          R_AARCH64 = 282
    R_AARCH64_CALL26                          R_AARCH64 = 283
    R_AARCH64_LDST16_ABS_LO12_NC              R_AARCH64 = 284
    R_AARCH64_LDST32_ABS_LO12_NC              R_AARCH64 = 285
    R_AARCH64_LDST64_ABS_LO12_NC              R_AARCH64 = 286
    R_AARCH64_LDST128_ABS_LO12_NC             R_AARCH64 = 299
    R_AARCH64_GOT_LD_PREL19                   R_AARCH64 = 309
    R_AARCH64_LD64_GOTOFF_LO15                R_AARCH64 = 310
    R_AARCH64_ADR_GOT_PAGE                    R_AARCH64 = 311
    R_AARCH64_LD64_GOT_LO12_NC                R_AARCH64 = 312
    R_AARCH64_LD64_GOTPAGE_LO15               R_AARCH64 = 313
    R_AARCH64_TLSGD_ADR_PREL21                R_AARCH64 = 512
    R_AARCH64_TLSGD_ADR_PAGE21                R_AARCH64 = 513
    R_AARCH64_TLSGD_ADD_LO12_NC               R_AARCH64 = 514
    R_AARCH64_TLSGD_MOVW_G1                   R_AARCH64 = 515
    R_AARCH64_TLSGD_MOVW_G0_NC                R_AARCH64 = 516
    R_AARCH64_TLSLD_ADR_PREL21                R_AARCH64 = 517
    R_AARCH64_TLSLD_ADR_PAGE21                R_AARCH64 = 518
    R_AARCH64_TLSIE_MOVW_GOTTPREL_G1          R_AARCH64 = 539
    R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC       R_AARCH64 = 540
    R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21       R_AARCH64 = 541
    R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC     R_AARCH64 = 542
    R_AARCH64_TLSIE_LD_GOTTPREL_PREL19        R_AARCH64 = 543
    R_AARCH64_TLSLE_MOVW_TPREL_G2             R_AARCH64 = 544
    R_AARCH64_TLSLE_MOVW_TPREL_G1             R_AARCH64 = 545
    R_AARCH64_TLSLE_MOVW_TPREL_G1_NC          R_AARCH64 = 546
    R_AARCH64_TLSLE_MOVW_TPREL_G0             R_AARCH64 = 547
    R_AARCH64_TLSLE_MOVW_TPREL_G0_NC          R_AARCH64 = 548
    R_AARCH64_TLSLE_ADD_TPREL_HI12            R_AARCH64 = 549
    R_AARCH64_TLSLE_ADD_TPREL_LO12            R_AARCH64 = 550
    R_AARCH64_TLSLE_ADD_TPREL_LO12_NC         R_AARCH64 = 551
    R_AARCH64_TLSDESC_LD_PREL19               R_AARCH64 = 560
    R_AARCH64_TLSDESC_ADR_PREL21              R_AARCH64 = 561
    R_AARCH64_TLSDESC_ADR_PAGE21              R_AARCH64 = 562
    R_AARCH64_TLSDESC_LD64_LO12_NC            R_AARCH64 = 563
    R_AARCH64_TLSDESC_ADD_LO12_NC             R_AARCH64 = 564
    R_AARCH64_TLSDESC_OFF_G1                  R_AARCH64 = 565
    R_AARCH64_TLSDESC_OFF_G0_NC               R_AARCH64 = 566
    R_AARCH64_TLSDESC_LDR                     R_AARCH64 = 567
    R_AARCH64_TLSDESC_ADD                     R_AARCH64 = 568
    R_AARCH64_TLSDESC_CALL                    R_AARCH64 = 569
    R_AARCH64_TLSLE_LDST128_TPREL_LO12        R_AARCH64 = 570
    R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC     R_AARCH64 = 571
    R_AARCH64_TLSLD_LDST128_DTPREL_LO12       R_AARCH64 = 572
    R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC    R_AARCH64 = 573
    R_AARCH64_COPY                            R_AARCH64 = 1024
    R_AARCH64_GLOB_DAT                        R_AARCH64 = 1025
    R_AARCH64_JUMP_SLOT                       R_AARCH64 = 1026
    R_AARCH64_RELATIVE                        R_AARCH64 = 1027
    R_AARCH64_TLS_DTPMOD64                    R_AARCH64 = 1028
    R_AARCH64_TLS_DTPREL64                    R_AARCH64 = 1029
    R_AARCH64_TLS_TPREL64                     R_AARCH64 = 1030
    R_AARCH64_TLSDESC                         R_AARCH64 = 1031
    R_AARCH64_IRELATIVE                       R_AARCH64 = 1032
)</pre> <h3 id="R_AARCH64.GoString">func (R_AARCH64) <span>GoString</span>  <span title="Added in Go 1.4">1.4</span> </h3> <pre data-language="go">func (i R_AARCH64) GoString() string</pre> <h3 id="R_AARCH64.String">func (R_AARCH64) <span>String</span>  <span title="Added in Go 1.4">1.4</span> </h3> <pre data-language="go">func (i R_AARCH64) String() string</pre> <h2 id="R_ALPHA">type <span>R_ALPHA</span>  </h2> <p>Relocation types for Alpha. </p>
<pre data-language="go">type R_ALPHA int</pre> <pre data-language="go">const (
    R_ALPHA_NONE           R_ALPHA = 0  /* No reloc */
    R_ALPHA_REFLONG        R_ALPHA = 1  /* Direct 32 bit */
    R_ALPHA_REFQUAD        R_ALPHA = 2  /* Direct 64 bit */
    R_ALPHA_GPREL32        R_ALPHA = 3  /* GP relative 32 bit */
    R_ALPHA_LITERAL        R_ALPHA = 4  /* GP relative 16 bit w/optimization */
    R_ALPHA_LITUSE         R_ALPHA = 5  /* Optimization hint for LITERAL */
    R_ALPHA_GPDISP         R_ALPHA = 6  /* Add displacement to GP */
    R_ALPHA_BRADDR         R_ALPHA = 7  /* PC+4 relative 23 bit shifted */
    R_ALPHA_HINT           R_ALPHA = 8  /* PC+4 relative 16 bit shifted */
    R_ALPHA_SREL16         R_ALPHA = 9  /* PC relative 16 bit */
    R_ALPHA_SREL32         R_ALPHA = 10 /* PC relative 32 bit */
    R_ALPHA_SREL64         R_ALPHA = 11 /* PC relative 64 bit */
    R_ALPHA_OP_PUSH        R_ALPHA = 12 /* OP stack push */
    R_ALPHA_OP_STORE       R_ALPHA = 13 /* OP stack pop and store */
    R_ALPHA_OP_PSUB        R_ALPHA = 14 /* OP stack subtract */
    R_ALPHA_OP_PRSHIFT     R_ALPHA = 15 /* OP stack right shift */
    R_ALPHA_GPVALUE        R_ALPHA = 16
    R_ALPHA_GPRELHIGH      R_ALPHA = 17
    R_ALPHA_GPRELLOW       R_ALPHA = 18
    R_ALPHA_IMMED_GP_16    R_ALPHA = 19
    R_ALPHA_IMMED_GP_HI32  R_ALPHA = 20
    R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 21
    R_ALPHA_IMMED_BR_HI32  R_ALPHA = 22
    R_ALPHA_IMMED_LO32     R_ALPHA = 23
    R_ALPHA_COPY           R_ALPHA = 24 /* Copy symbol at runtime */
    R_ALPHA_GLOB_DAT       R_ALPHA = 25 /* Create GOT entry */
    R_ALPHA_JMP_SLOT       R_ALPHA = 26 /* Create PLT entry */
    R_ALPHA_RELATIVE       R_ALPHA = 27 /* Adjust by program base */
)</pre> <h3 id="R_ALPHA.GoString">func (R_ALPHA) <span>GoString</span>  </h3> <pre data-language="go">func (i R_ALPHA) GoString() string</pre> <h3 id="R_ALPHA.String">func (R_ALPHA) <span>String</span>  </h3> <pre data-language="go">func (i R_ALPHA) String() string</pre> <h2 id="R_ARM">type <span>R_ARM</span>  </h2> <p>Relocation types for ARM. </p>
<pre data-language="go">type R_ARM int</pre> <pre data-language="go">const (
    R_ARM_NONE               R_ARM = 0 /* No relocation. */
    R_ARM_PC24               R_ARM = 1
    R_ARM_ABS32              R_ARM = 2
    R_ARM_REL32              R_ARM = 3
    R_ARM_PC13               R_ARM = 4
    R_ARM_ABS16              R_ARM = 5
    R_ARM_ABS12              R_ARM = 6
    R_ARM_THM_ABS5           R_ARM = 7
    R_ARM_ABS8               R_ARM = 8
    R_ARM_SBREL32            R_ARM = 9
    R_ARM_THM_PC22           R_ARM = 10
    R_ARM_THM_PC8            R_ARM = 11
    R_ARM_AMP_VCALL9         R_ARM = 12
    R_ARM_SWI24              R_ARM = 13
    R_ARM_THM_SWI8           R_ARM = 14
    R_ARM_XPC25              R_ARM = 15
    R_ARM_THM_XPC22          R_ARM = 16
    R_ARM_TLS_DTPMOD32       R_ARM = 17
    R_ARM_TLS_DTPOFF32       R_ARM = 18
    R_ARM_TLS_TPOFF32        R_ARM = 19
    R_ARM_COPY               R_ARM = 20 /* Copy data from shared object. */
    R_ARM_GLOB_DAT           R_ARM = 21 /* Set GOT entry to data address. */
    R_ARM_JUMP_SLOT          R_ARM = 22 /* Set GOT entry to code address. */
    R_ARM_RELATIVE           R_ARM = 23 /* Add load address of shared object. */
    R_ARM_GOTOFF             R_ARM = 24 /* Add GOT-relative symbol address. */
    R_ARM_GOTPC              R_ARM = 25 /* Add PC-relative GOT table address. */
    R_ARM_GOT32              R_ARM = 26 /* Add PC-relative GOT offset. */
    R_ARM_PLT32              R_ARM = 27 /* Add PC-relative PLT offset. */
    R_ARM_CALL               R_ARM = 28
    R_ARM_JUMP24             R_ARM = 29
    R_ARM_THM_JUMP24         R_ARM = 30
    R_ARM_BASE_ABS           R_ARM = 31
    R_ARM_ALU_PCREL_7_0      R_ARM = 32
    R_ARM_ALU_PCREL_15_8     R_ARM = 33
    R_ARM_ALU_PCREL_23_15    R_ARM = 34
    R_ARM_LDR_SBREL_11_10_NC R_ARM = 35
    R_ARM_ALU_SBREL_19_12_NC R_ARM = 36
    R_ARM_ALU_SBREL_27_20_CK R_ARM = 37
    R_ARM_TARGET1            R_ARM = 38
    R_ARM_SBREL31            R_ARM = 39
    R_ARM_V4BX               R_ARM = 40
    R_ARM_TARGET2            R_ARM = 41
    R_ARM_PREL31             R_ARM = 42
    R_ARM_MOVW_ABS_NC        R_ARM = 43
    R_ARM_MOVT_ABS           R_ARM = 44
    R_ARM_MOVW_PREL_NC       R_ARM = 45
    R_ARM_MOVT_PREL          R_ARM = 46
    R_ARM_THM_MOVW_ABS_NC    R_ARM = 47
    R_ARM_THM_MOVT_ABS       R_ARM = 48
    R_ARM_THM_MOVW_PREL_NC   R_ARM = 49
    R_ARM_THM_MOVT_PREL      R_ARM = 50
    R_ARM_THM_JUMP19         R_ARM = 51
    R_ARM_THM_JUMP6          R_ARM = 52
    R_ARM_THM_ALU_PREL_11_0  R_ARM = 53
    R_ARM_THM_PC12           R_ARM = 54
    R_ARM_ABS32_NOI          R_ARM = 55
    R_ARM_REL32_NOI          R_ARM = 56
    R_ARM_ALU_PC_G0_NC       R_ARM = 57
    R_ARM_ALU_PC_G0          R_ARM = 58
    R_ARM_ALU_PC_G1_NC       R_ARM = 59
    R_ARM_ALU_PC_G1          R_ARM = 60
    R_ARM_ALU_PC_G2          R_ARM = 61
    R_ARM_LDR_PC_G1          R_ARM = 62
    R_ARM_LDR_PC_G2          R_ARM = 63
    R_ARM_LDRS_PC_G0         R_ARM = 64
    R_ARM_LDRS_PC_G1         R_ARM = 65
    R_ARM_LDRS_PC_G2         R_ARM = 66
    R_ARM_LDC_PC_G0          R_ARM = 67
    R_ARM_LDC_PC_G1          R_ARM = 68
    R_ARM_LDC_PC_G2          R_ARM = 69
    R_ARM_ALU_SB_G0_NC       R_ARM = 70
    R_ARM_ALU_SB_G0          R_ARM = 71
    R_ARM_ALU_SB_G1_NC       R_ARM = 72
    R_ARM_ALU_SB_G1          R_ARM = 73
    R_ARM_ALU_SB_G2          R_ARM = 74
    R_ARM_LDR_SB_G0          R_ARM = 75
    R_ARM_LDR_SB_G1          R_ARM = 76
    R_ARM_LDR_SB_G2          R_ARM = 77
    R_ARM_LDRS_SB_G0         R_ARM = 78
    R_ARM_LDRS_SB_G1         R_ARM = 79
    R_ARM_LDRS_SB_G2         R_ARM = 80
    R_ARM_LDC_SB_G0          R_ARM = 81
    R_ARM_LDC_SB_G1          R_ARM = 82
    R_ARM_LDC_SB_G2          R_ARM = 83
    R_ARM_MOVW_BREL_NC       R_ARM = 84
    R_ARM_MOVT_BREL          R_ARM = 85
    R_ARM_MOVW_BREL          R_ARM = 86
    R_ARM_THM_MOVW_BREL_NC   R_ARM = 87
    R_ARM_THM_MOVT_BREL      R_ARM = 88
    R_ARM_THM_MOVW_BREL      R_ARM = 89
    R_ARM_TLS_GOTDESC        R_ARM = 90
    R_ARM_TLS_CALL           R_ARM = 91
    R_ARM_TLS_DESCSEQ        R_ARM = 92
    R_ARM_THM_TLS_CALL       R_ARM = 93
    R_ARM_PLT32_ABS          R_ARM = 94
    R_ARM_GOT_ABS            R_ARM = 95
    R_ARM_GOT_PREL           R_ARM = 96
    R_ARM_GOT_BREL12         R_ARM = 97
    R_ARM_GOTOFF12           R_ARM = 98
    R_ARM_GOTRELAX           R_ARM = 99
    R_ARM_GNU_VTENTRY        R_ARM = 100
    R_ARM_GNU_VTINHERIT      R_ARM = 101
    R_ARM_THM_JUMP11         R_ARM = 102
    R_ARM_THM_JUMP8          R_ARM = 103
    R_ARM_TLS_GD32           R_ARM = 104
    R_ARM_TLS_LDM32          R_ARM = 105
    R_ARM_TLS_LDO32          R_ARM = 106
    R_ARM_TLS_IE32           R_ARM = 107
    R_ARM_TLS_LE32           R_ARM = 108
    R_ARM_TLS_LDO12          R_ARM = 109
    R_ARM_TLS_LE12           R_ARM = 110
    R_ARM_TLS_IE12GP         R_ARM = 111
    R_ARM_PRIVATE_0          R_ARM = 112
    R_ARM_PRIVATE_1          R_ARM = 113
    R_ARM_PRIVATE_2          R_ARM = 114
    R_ARM_PRIVATE_3          R_ARM = 115
    R_ARM_PRIVATE_4          R_ARM = 116
    R_ARM_PRIVATE_5          R_ARM = 117
    R_ARM_PRIVATE_6          R_ARM = 118
    R_ARM_PRIVATE_7          R_ARM = 119
    R_ARM_PRIVATE_8          R_ARM = 120
    R_ARM_PRIVATE_9          R_ARM = 121
    R_ARM_PRIVATE_10         R_ARM = 122
    R_ARM_PRIVATE_11         R_ARM = 123
    R_ARM_PRIVATE_12         R_ARM = 124
    R_ARM_PRIVATE_13         R_ARM = 125
    R_ARM_PRIVATE_14         R_ARM = 126
    R_ARM_PRIVATE_15         R_ARM = 127
    R_ARM_ME_TOO             R_ARM = 128
    R_ARM_THM_TLS_DESCSEQ16  R_ARM = 129
    R_ARM_THM_TLS_DESCSEQ32  R_ARM = 130
    R_ARM_THM_GOT_BREL12     R_ARM = 131
    R_ARM_THM_ALU_ABS_G0_NC  R_ARM = 132
    R_ARM_THM_ALU_ABS_G1_NC  R_ARM = 133
    R_ARM_THM_ALU_ABS_G2_NC  R_ARM = 134
    R_ARM_THM_ALU_ABS_G3     R_ARM = 135
    R_ARM_IRELATIVE          R_ARM = 160
    R_ARM_RXPC25             R_ARM = 249
    R_ARM_RSBREL32           R_ARM = 250
    R_ARM_THM_RPC22          R_ARM = 251
    R_ARM_RREL32             R_ARM = 252
    R_ARM_RABS32             R_ARM = 253
    R_ARM_RPC24              R_ARM = 254
    R_ARM_RBASE              R_ARM = 255
)</pre> <h3 id="R_ARM.GoString">func (R_ARM) <span>GoString</span>  </h3> <pre data-language="go">func (i R_ARM) GoString() string</pre> <h3 id="R_ARM.String">func (R_ARM) <span>String</span>  </h3> <pre data-language="go">func (i R_ARM) String() string</pre> <h2 id="R_LARCH">type <span>R_LARCH</span>  <span title="Added in Go 1.19">1.19</span> </h2> <p>Relocation types for LoongArch. </p>
<pre data-language="go">type R_LARCH int</pre> <pre data-language="go">const (
    R_LARCH_NONE                       R_LARCH = 0
    R_LARCH_32                         R_LARCH = 1
    R_LARCH_64                         R_LARCH = 2
    R_LARCH_RELATIVE                   R_LARCH = 3
    R_LARCH_COPY                       R_LARCH = 4
    R_LARCH_JUMP_SLOT                  R_LARCH = 5
    R_LARCH_TLS_DTPMOD32               R_LARCH = 6
    R_LARCH_TLS_DTPMOD64               R_LARCH = 7
    R_LARCH_TLS_DTPREL32               R_LARCH = 8
    R_LARCH_TLS_DTPREL64               R_LARCH = 9
    R_LARCH_TLS_TPREL32                R_LARCH = 10
    R_LARCH_TLS_TPREL64                R_LARCH = 11
    R_LARCH_IRELATIVE                  R_LARCH = 12
    R_LARCH_MARK_LA                    R_LARCH = 20
    R_LARCH_MARK_PCREL                 R_LARCH = 21
    R_LARCH_SOP_PUSH_PCREL             R_LARCH = 22
    R_LARCH_SOP_PUSH_ABSOLUTE          R_LARCH = 23
    R_LARCH_SOP_PUSH_DUP               R_LARCH = 24
    R_LARCH_SOP_PUSH_GPREL             R_LARCH = 25
    R_LARCH_SOP_PUSH_TLS_TPREL         R_LARCH = 26
    R_LARCH_SOP_PUSH_TLS_GOT           R_LARCH = 27
    R_LARCH_SOP_PUSH_TLS_GD            R_LARCH = 28
    R_LARCH_SOP_PUSH_PLT_PCREL         R_LARCH = 29
    R_LARCH_SOP_ASSERT                 R_LARCH = 30
    R_LARCH_SOP_NOT                    R_LARCH = 31
    R_LARCH_SOP_SUB                    R_LARCH = 32
    R_LARCH_SOP_SL                     R_LARCH = 33
    R_LARCH_SOP_SR                     R_LARCH = 34
    R_LARCH_SOP_ADD                    R_LARCH = 35
    R_LARCH_SOP_AND                    R_LARCH = 36
    R_LARCH_SOP_IF_ELSE                R_LARCH = 37
    R_LARCH_SOP_POP_32_S_10_5          R_LARCH = 38
    R_LARCH_SOP_POP_32_U_10_12         R_LARCH = 39
    R_LARCH_SOP_POP_32_S_10_12         R_LARCH = 40
    R_LARCH_SOP_POP_32_S_10_16         R_LARCH = 41
    R_LARCH_SOP_POP_32_S_10_16_S2      R_LARCH = 42
    R_LARCH_SOP_POP_32_S_5_20          R_LARCH = 43
    R_LARCH_SOP_POP_32_S_0_5_10_16_S2  R_LARCH = 44
    R_LARCH_SOP_POP_32_S_0_10_10_16_S2 R_LARCH = 45
    R_LARCH_SOP_POP_32_U               R_LARCH = 46
    R_LARCH_ADD8                       R_LARCH = 47
    R_LARCH_ADD16                      R_LARCH = 48
    R_LARCH_ADD24                      R_LARCH = 49
    R_LARCH_ADD32                      R_LARCH = 50
    R_LARCH_ADD64                      R_LARCH = 51
    R_LARCH_SUB8                       R_LARCH = 52
    R_LARCH_SUB16                      R_LARCH = 53
    R_LARCH_SUB24                      R_LARCH = 54
    R_LARCH_SUB32                      R_LARCH = 55
    R_LARCH_SUB64                      R_LARCH = 56
    R_LARCH_GNU_VTINHERIT              R_LARCH = 57
    R_LARCH_GNU_VTENTRY                R_LARCH = 58
    R_LARCH_B16                        R_LARCH = 64
    R_LARCH_B21                        R_LARCH = 65
    R_LARCH_B26                        R_LARCH = 66
    R_LARCH_ABS_HI20                   R_LARCH = 67
    R_LARCH_ABS_LO12                   R_LARCH = 68
    R_LARCH_ABS64_LO20                 R_LARCH = 69
    R_LARCH_ABS64_HI12                 R_LARCH = 70
    R_LARCH_PCALA_HI20                 R_LARCH = 71
    R_LARCH_PCALA_LO12                 R_LARCH = 72
    R_LARCH_PCALA64_LO20               R_LARCH = 73
    R_LARCH_PCALA64_HI12               R_LARCH = 74
    R_LARCH_GOT_PC_HI20                R_LARCH = 75
    R_LARCH_GOT_PC_LO12                R_LARCH = 76
    R_LARCH_GOT64_PC_LO20              R_LARCH = 77
    R_LARCH_GOT64_PC_HI12              R_LARCH = 78
    R_LARCH_GOT_HI20                   R_LARCH = 79
    R_LARCH_GOT_LO12                   R_LARCH = 80
    R_LARCH_GOT64_LO20                 R_LARCH = 81
    R_LARCH_GOT64_HI12                 R_LARCH = 82
    R_LARCH_TLS_LE_HI20                R_LARCH = 83
    R_LARCH_TLS_LE_LO12                R_LARCH = 84
    R_LARCH_TLS_LE64_LO20              R_LARCH = 85
    R_LARCH_TLS_LE64_HI12              R_LARCH = 86
    R_LARCH_TLS_IE_PC_HI20             R_LARCH = 87
    R_LARCH_TLS_IE_PC_LO12             R_LARCH = 88
    R_LARCH_TLS_IE64_PC_LO20           R_LARCH = 89
    R_LARCH_TLS_IE64_PC_HI12           R_LARCH = 90
    R_LARCH_TLS_IE_HI20                R_LARCH = 91
    R_LARCH_TLS_IE_LO12                R_LARCH = 92
    R_LARCH_TLS_IE64_LO20              R_LARCH = 93
    R_LARCH_TLS_IE64_HI12              R_LARCH = 94
    R_LARCH_TLS_LD_PC_HI20             R_LARCH = 95
    R_LARCH_TLS_LD_HI20                R_LARCH = 96
    R_LARCH_TLS_GD_PC_HI20             R_LARCH = 97
    R_LARCH_TLS_GD_HI20                R_LARCH = 98
    R_LARCH_32_PCREL                   R_LARCH = 99
    R_LARCH_RELAX                      R_LARCH = 100
    R_LARCH_DELETE                     R_LARCH = 101
    R_LARCH_ALIGN                      R_LARCH = 102
    R_LARCH_PCREL20_S2                 R_LARCH = 103
    R_LARCH_CFA                        R_LARCH = 104
    R_LARCH_ADD6                       R_LARCH = 105
    R_LARCH_SUB6                       R_LARCH = 106
    R_LARCH_ADD_ULEB128                R_LARCH = 107
    R_LARCH_SUB_ULEB128                R_LARCH = 108
    R_LARCH_64_PCREL                   R_LARCH = 109
)</pre> <h3 id="R_LARCH.GoString">func (R_LARCH) <span>GoString</span>  <span title="Added in Go 1.19">1.19</span> </h3> <pre data-language="go">func (i R_LARCH) GoString() string</pre> <h3 id="R_LARCH.String">func (R_LARCH) <span>String</span>  <span title="Added in Go 1.19">1.19</span> </h3> <pre data-language="go">func (i R_LARCH) String() string</pre> <h2 id="R_MIPS">type <span>R_MIPS</span>  <span title="Added in Go 1.6">1.6</span> </h2> <p>Relocation types for MIPS. </p>
<pre data-language="go">type R_MIPS int</pre> <pre data-language="go">const (
    R_MIPS_NONE          R_MIPS = 0
    R_MIPS_16            R_MIPS = 1
    R_MIPS_32            R_MIPS = 2
    R_MIPS_REL32         R_MIPS = 3
    R_MIPS_26            R_MIPS = 4
    R_MIPS_HI16          R_MIPS = 5  /* high 16 bits of symbol value */
    R_MIPS_LO16          R_MIPS = 6  /* low 16 bits of symbol value */
    R_MIPS_GPREL16       R_MIPS = 7  /* GP-relative reference  */
    R_MIPS_LITERAL       R_MIPS = 8  /* Reference to literal section  */
    R_MIPS_GOT16         R_MIPS = 9  /* Reference to global offset table */
    R_MIPS_PC16          R_MIPS = 10 /* 16 bit PC relative reference */
    R_MIPS_CALL16        R_MIPS = 11 /* 16 bit call through glbl offset tbl */
    R_MIPS_GPREL32       R_MIPS = 12
    R_MIPS_SHIFT5        R_MIPS = 16
    R_MIPS_SHIFT6        R_MIPS = 17
    R_MIPS_64            R_MIPS = 18
    R_MIPS_GOT_DISP      R_MIPS = 19
    R_MIPS_GOT_PAGE      R_MIPS = 20
    R_MIPS_GOT_OFST      R_MIPS = 21
    R_MIPS_GOT_HI16      R_MIPS = 22
    R_MIPS_GOT_LO16      R_MIPS = 23
    R_MIPS_SUB           R_MIPS = 24
    R_MIPS_INSERT_A      R_MIPS = 25
    R_MIPS_INSERT_B      R_MIPS = 26
    R_MIPS_DELETE        R_MIPS = 27
    R_MIPS_HIGHER        R_MIPS = 28
    R_MIPS_HIGHEST       R_MIPS = 29
    R_MIPS_CALL_HI16     R_MIPS = 30
    R_MIPS_CALL_LO16     R_MIPS = 31
    R_MIPS_SCN_DISP      R_MIPS = 32
    R_MIPS_REL16         R_MIPS = 33
    R_MIPS_ADD_IMMEDIATE R_MIPS = 34
    R_MIPS_PJUMP         R_MIPS = 35
    R_MIPS_RELGOT        R_MIPS = 36
    R_MIPS_JALR          R_MIPS = 37

    R_MIPS_TLS_DTPMOD32    R_MIPS = 38 /* Module number 32 bit */
    R_MIPS_TLS_DTPREL32    R_MIPS = 39 /* Module-relative offset 32 bit */
    R_MIPS_TLS_DTPMOD64    R_MIPS = 40 /* Module number 64 bit */
    R_MIPS_TLS_DTPREL64    R_MIPS = 41 /* Module-relative offset 64 bit */
    R_MIPS_TLS_GD          R_MIPS = 42 /* 16 bit GOT offset for GD */
    R_MIPS_TLS_LDM         R_MIPS = 43 /* 16 bit GOT offset for LDM */
    R_MIPS_TLS_DTPREL_HI16 R_MIPS = 44 /* Module-relative offset, high 16 bits */
    R_MIPS_TLS_DTPREL_LO16 R_MIPS = 45 /* Module-relative offset, low 16 bits */
    R_MIPS_TLS_GOTTPREL    R_MIPS = 46 /* 16 bit GOT offset for IE */
    R_MIPS_TLS_TPREL32     R_MIPS = 47 /* TP-relative offset, 32 bit */
    R_MIPS_TLS_TPREL64     R_MIPS = 48 /* TP-relative offset, 64 bit */
    R_MIPS_TLS_TPREL_HI16  R_MIPS = 49 /* TP-relative offset, high 16 bits */
    R_MIPS_TLS_TPREL_LO16  R_MIPS = 50 /* TP-relative offset, low 16 bits */

    R_MIPS_PC32 R_MIPS = 248 /* 32 bit PC relative reference */
)</pre> <h3 id="R_MIPS.GoString">func (R_MIPS) <span>GoString</span>  <span title="Added in Go 1.6">1.6</span> </h3> <pre data-language="go">func (i R_MIPS) GoString() string</pre> <h3 id="R_MIPS.String">func (R_MIPS) <span>String</span>  <span title="Added in Go 1.6">1.6</span> </h3> <pre data-language="go">func (i R_MIPS) String() string</pre> <h2 id="R_PPC">type <span>R_PPC</span>  </h2> <p>Relocation types for PowerPC. </p>
<p>Values that are shared by both R_PPC and R_PPC64 are prefixed with R_POWERPC_ in the ELF standard. For the R_PPC type, the relevant shared relocations have been renamed with the prefix R_PPC_. The original name follows the value in a comment. </p>
<pre data-language="go">type R_PPC int</pre> <pre data-language="go">const (
    R_PPC_NONE            R_PPC = 0  // R_POWERPC_NONE
    R_PPC_ADDR32          R_PPC = 1  // R_POWERPC_ADDR32
    R_PPC_ADDR24          R_PPC = 2  // R_POWERPC_ADDR24
    R_PPC_ADDR16          R_PPC = 3  // R_POWERPC_ADDR16
    R_PPC_ADDR16_LO       R_PPC = 4  // R_POWERPC_ADDR16_LO
    R_PPC_ADDR16_HI       R_PPC = 5  // R_POWERPC_ADDR16_HI
    R_PPC_ADDR16_HA       R_PPC = 6  // R_POWERPC_ADDR16_HA
    R_PPC_ADDR14          R_PPC = 7  // R_POWERPC_ADDR14
    R_PPC_ADDR14_BRTAKEN  R_PPC = 8  // R_POWERPC_ADDR14_BRTAKEN
    R_PPC_ADDR14_BRNTAKEN R_PPC = 9  // R_POWERPC_ADDR14_BRNTAKEN
    R_PPC_REL24           R_PPC = 10 // R_POWERPC_REL24
    R_PPC_REL14           R_PPC = 11 // R_POWERPC_REL14
    R_PPC_REL14_BRTAKEN   R_PPC = 12 // R_POWERPC_REL14_BRTAKEN
    R_PPC_REL14_BRNTAKEN  R_PPC = 13 // R_POWERPC_REL14_BRNTAKEN
    R_PPC_GOT16           R_PPC = 14 // R_POWERPC_GOT16
    R_PPC_GOT16_LO        R_PPC = 15 // R_POWERPC_GOT16_LO
    R_PPC_GOT16_HI        R_PPC = 16 // R_POWERPC_GOT16_HI
    R_PPC_GOT16_HA        R_PPC = 17 // R_POWERPC_GOT16_HA
    R_PPC_PLTREL24        R_PPC = 18
    R_PPC_COPY            R_PPC = 19 // R_POWERPC_COPY
    R_PPC_GLOB_DAT        R_PPC = 20 // R_POWERPC_GLOB_DAT
    R_PPC_JMP_SLOT        R_PPC = 21 // R_POWERPC_JMP_SLOT
    R_PPC_RELATIVE        R_PPC = 22 // R_POWERPC_RELATIVE
    R_PPC_LOCAL24PC       R_PPC = 23
    R_PPC_UADDR32         R_PPC = 24 // R_POWERPC_UADDR32
    R_PPC_UADDR16         R_PPC = 25 // R_POWERPC_UADDR16
    R_PPC_REL32           R_PPC = 26 // R_POWERPC_REL32
    R_PPC_PLT32           R_PPC = 27 // R_POWERPC_PLT32
    R_PPC_PLTREL32        R_PPC = 28 // R_POWERPC_PLTREL32
    R_PPC_PLT16_LO        R_PPC = 29 // R_POWERPC_PLT16_LO
    R_PPC_PLT16_HI        R_PPC = 30 // R_POWERPC_PLT16_HI
    R_PPC_PLT16_HA        R_PPC = 31 // R_POWERPC_PLT16_HA
    R_PPC_SDAREL16        R_PPC = 32
    R_PPC_SECTOFF         R_PPC = 33 // R_POWERPC_SECTOFF
    R_PPC_SECTOFF_LO      R_PPC = 34 // R_POWERPC_SECTOFF_LO
    R_PPC_SECTOFF_HI      R_PPC = 35 // R_POWERPC_SECTOFF_HI
    R_PPC_SECTOFF_HA      R_PPC = 36 // R_POWERPC_SECTOFF_HA
    R_PPC_TLS             R_PPC = 67 // R_POWERPC_TLS
    R_PPC_DTPMOD32        R_PPC = 68 // R_POWERPC_DTPMOD32
    R_PPC_TPREL16         R_PPC = 69 // R_POWERPC_TPREL16
    R_PPC_TPREL16_LO      R_PPC = 70 // R_POWERPC_TPREL16_LO
    R_PPC_TPREL16_HI      R_PPC = 71 // R_POWERPC_TPREL16_HI
    R_PPC_TPREL16_HA      R_PPC = 72 // R_POWERPC_TPREL16_HA
    R_PPC_TPREL32         R_PPC = 73 // R_POWERPC_TPREL32
    R_PPC_DTPREL16        R_PPC = 74 // R_POWERPC_DTPREL16
    R_PPC_DTPREL16_LO     R_PPC = 75 // R_POWERPC_DTPREL16_LO
    R_PPC_DTPREL16_HI     R_PPC = 76 // R_POWERPC_DTPREL16_HI
    R_PPC_DTPREL16_HA     R_PPC = 77 // R_POWERPC_DTPREL16_HA
    R_PPC_DTPREL32        R_PPC = 78 // R_POWERPC_DTPREL32
    R_PPC_GOT_TLSGD16     R_PPC = 79 // R_POWERPC_GOT_TLSGD16
    R_PPC_GOT_TLSGD16_LO  R_PPC = 80 // R_POWERPC_GOT_TLSGD16_LO
    R_PPC_GOT_TLSGD16_HI  R_PPC = 81 // R_POWERPC_GOT_TLSGD16_HI
    R_PPC_GOT_TLSGD16_HA  R_PPC = 82 // R_POWERPC_GOT_TLSGD16_HA
    R_PPC_GOT_TLSLD16     R_PPC = 83 // R_POWERPC_GOT_TLSLD16
    R_PPC_GOT_TLSLD16_LO  R_PPC = 84 // R_POWERPC_GOT_TLSLD16_LO
    R_PPC_GOT_TLSLD16_HI  R_PPC = 85 // R_POWERPC_GOT_TLSLD16_HI
    R_PPC_GOT_TLSLD16_HA  R_PPC = 86 // R_POWERPC_GOT_TLSLD16_HA
    R_PPC_GOT_TPREL16     R_PPC = 87 // R_POWERPC_GOT_TPREL16
    R_PPC_GOT_TPREL16_LO  R_PPC = 88 // R_POWERPC_GOT_TPREL16_LO
    R_PPC_GOT_TPREL16_HI  R_PPC = 89 // R_POWERPC_GOT_TPREL16_HI
    R_PPC_GOT_TPREL16_HA  R_PPC = 90 // R_POWERPC_GOT_TPREL16_HA
    R_PPC_EMB_NADDR32     R_PPC = 101
    R_PPC_EMB_NADDR16     R_PPC = 102
    R_PPC_EMB_NADDR16_LO  R_PPC = 103
    R_PPC_EMB_NADDR16_HI  R_PPC = 104
    R_PPC_EMB_NADDR16_HA  R_PPC = 105
    R_PPC_EMB_SDAI16      R_PPC = 106
    R_PPC_EMB_SDA2I16     R_PPC = 107
    R_PPC_EMB_SDA2REL     R_PPC = 108
    R_PPC_EMB_SDA21       R_PPC = 109
    R_PPC_EMB_MRKREF      R_PPC = 110
    R_PPC_EMB_RELSEC16    R_PPC = 111
    R_PPC_EMB_RELST_LO    R_PPC = 112
    R_PPC_EMB_RELST_HI    R_PPC = 113
    R_PPC_EMB_RELST_HA    R_PPC = 114
    R_PPC_EMB_BIT_FLD     R_PPC = 115
    R_PPC_EMB_RELSDA      R_PPC = 116
)</pre> <h3 id="R_PPC.GoString">func (R_PPC) <span>GoString</span>  </h3> <pre data-language="go">func (i R_PPC) GoString() string</pre> <h3 id="R_PPC.String">func (R_PPC) <span>String</span>  </h3> <pre data-language="go">func (i R_PPC) String() string</pre> <h2 id="R_PPC64">type <span>R_PPC64</span>  <span title="Added in Go 1.5">1.5</span> </h2> <p>Relocation types for 64-bit PowerPC or Power Architecture processors. </p>
<p>Values that are shared by both R_PPC and R_PPC64 are prefixed with R_POWERPC_ in the ELF standard. For the R_PPC64 type, the relevant shared relocations have been renamed with the prefix R_PPC64_. The original name follows the value in a comment. </p>
<pre data-language="go">type R_PPC64 int</pre> <pre data-language="go">const (
    R_PPC64_NONE               R_PPC64 = 0  // R_POWERPC_NONE
    R_PPC64_ADDR32             R_PPC64 = 1  // R_POWERPC_ADDR32
    R_PPC64_ADDR24             R_PPC64 = 2  // R_POWERPC_ADDR24
    R_PPC64_ADDR16             R_PPC64 = 3  // R_POWERPC_ADDR16
    R_PPC64_ADDR16_LO          R_PPC64 = 4  // R_POWERPC_ADDR16_LO
    R_PPC64_ADDR16_HI          R_PPC64 = 5  // R_POWERPC_ADDR16_HI
    R_PPC64_ADDR16_HA          R_PPC64 = 6  // R_POWERPC_ADDR16_HA
    R_PPC64_ADDR14             R_PPC64 = 7  // R_POWERPC_ADDR14
    R_PPC64_ADDR14_BRTAKEN     R_PPC64 = 8  // R_POWERPC_ADDR14_BRTAKEN
    R_PPC64_ADDR14_BRNTAKEN    R_PPC64 = 9  // R_POWERPC_ADDR14_BRNTAKEN
    R_PPC64_REL24              R_PPC64 = 10 // R_POWERPC_REL24
    R_PPC64_REL14              R_PPC64 = 11 // R_POWERPC_REL14
    R_PPC64_REL14_BRTAKEN      R_PPC64 = 12 // R_POWERPC_REL14_BRTAKEN
    R_PPC64_REL14_BRNTAKEN     R_PPC64 = 13 // R_POWERPC_REL14_BRNTAKEN
    R_PPC64_GOT16              R_PPC64 = 14 // R_POWERPC_GOT16
    R_PPC64_GOT16_LO           R_PPC64 = 15 // R_POWERPC_GOT16_LO
    R_PPC64_GOT16_HI           R_PPC64 = 16 // R_POWERPC_GOT16_HI
    R_PPC64_GOT16_HA           R_PPC64 = 17 // R_POWERPC_GOT16_HA
    R_PPC64_COPY               R_PPC64 = 19 // R_POWERPC_COPY
    R_PPC64_GLOB_DAT           R_PPC64 = 20 // R_POWERPC_GLOB_DAT
    R_PPC64_JMP_SLOT           R_PPC64 = 21 // R_POWERPC_JMP_SLOT
    R_PPC64_RELATIVE           R_PPC64 = 22 // R_POWERPC_RELATIVE
    R_PPC64_UADDR32            R_PPC64 = 24 // R_POWERPC_UADDR32
    R_PPC64_UADDR16            R_PPC64 = 25 // R_POWERPC_UADDR16
    R_PPC64_REL32              R_PPC64 = 26 // R_POWERPC_REL32
    R_PPC64_PLT32              R_PPC64 = 27 // R_POWERPC_PLT32
    R_PPC64_PLTREL32           R_PPC64 = 28 // R_POWERPC_PLTREL32
    R_PPC64_PLT16_LO           R_PPC64 = 29 // R_POWERPC_PLT16_LO
    R_PPC64_PLT16_HI           R_PPC64 = 30 // R_POWERPC_PLT16_HI
    R_PPC64_PLT16_HA           R_PPC64 = 31 // R_POWERPC_PLT16_HA
    R_PPC64_SECTOFF            R_PPC64 = 33 // R_POWERPC_SECTOFF
    R_PPC64_SECTOFF_LO         R_PPC64 = 34 // R_POWERPC_SECTOFF_LO
    R_PPC64_SECTOFF_HI         R_PPC64 = 35 // R_POWERPC_SECTOFF_HI
    R_PPC64_SECTOFF_HA         R_PPC64 = 36 // R_POWERPC_SECTOFF_HA
    R_PPC64_REL30              R_PPC64 = 37 // R_POWERPC_ADDR30
    R_PPC64_ADDR64             R_PPC64 = 38
    R_PPC64_ADDR16_HIGHER      R_PPC64 = 39
    R_PPC64_ADDR16_HIGHERA     R_PPC64 = 40
    R_PPC64_ADDR16_HIGHEST     R_PPC64 = 41
    R_PPC64_ADDR16_HIGHESTA    R_PPC64 = 42
    R_PPC64_UADDR64            R_PPC64 = 43
    R_PPC64_REL64              R_PPC64 = 44
    R_PPC64_PLT64              R_PPC64 = 45
    R_PPC64_PLTREL64           R_PPC64 = 46
    R_PPC64_TOC16              R_PPC64 = 47
    R_PPC64_TOC16_LO           R_PPC64 = 48
    R_PPC64_TOC16_HI           R_PPC64 = 49
    R_PPC64_TOC16_HA           R_PPC64 = 50
    R_PPC64_TOC                R_PPC64 = 51
    R_PPC64_PLTGOT16           R_PPC64 = 52
    R_PPC64_PLTGOT16_LO        R_PPC64 = 53
    R_PPC64_PLTGOT16_HI        R_PPC64 = 54
    R_PPC64_PLTGOT16_HA        R_PPC64 = 55
    R_PPC64_ADDR16_DS          R_PPC64 = 56
    R_PPC64_ADDR16_LO_DS       R_PPC64 = 57
    R_PPC64_GOT16_DS           R_PPC64 = 58
    R_PPC64_GOT16_LO_DS        R_PPC64 = 59
    R_PPC64_PLT16_LO_DS        R_PPC64 = 60
    R_PPC64_SECTOFF_DS         R_PPC64 = 61
    R_PPC64_SECTOFF_LO_DS      R_PPC64 = 62
    R_PPC64_TOC16_DS           R_PPC64 = 63
    R_PPC64_TOC16_LO_DS        R_PPC64 = 64
    R_PPC64_PLTGOT16_DS        R_PPC64 = 65
    R_PPC64_PLTGOT_LO_DS       R_PPC64 = 66
    R_PPC64_TLS                R_PPC64 = 67 // R_POWERPC_TLS
    R_PPC64_DTPMOD64           R_PPC64 = 68 // R_POWERPC_DTPMOD64
    R_PPC64_TPREL16            R_PPC64 = 69 // R_POWERPC_TPREL16
    R_PPC64_TPREL16_LO         R_PPC64 = 70 // R_POWERPC_TPREL16_LO
    R_PPC64_TPREL16_HI         R_PPC64 = 71 // R_POWERPC_TPREL16_HI
    R_PPC64_TPREL16_HA         R_PPC64 = 72 // R_POWERPC_TPREL16_HA
    R_PPC64_TPREL64            R_PPC64 = 73 // R_POWERPC_TPREL64
    R_PPC64_DTPREL16           R_PPC64 = 74 // R_POWERPC_DTPREL16
    R_PPC64_DTPREL16_LO        R_PPC64 = 75 // R_POWERPC_DTPREL16_LO
    R_PPC64_DTPREL16_HI        R_PPC64 = 76 // R_POWERPC_DTPREL16_HI
    R_PPC64_DTPREL16_HA        R_PPC64 = 77 // R_POWERPC_DTPREL16_HA
    R_PPC64_DTPREL64           R_PPC64 = 78 // R_POWERPC_DTPREL64
    R_PPC64_GOT_TLSGD16        R_PPC64 = 79 // R_POWERPC_GOT_TLSGD16
    R_PPC64_GOT_TLSGD16_LO     R_PPC64 = 80 // R_POWERPC_GOT_TLSGD16_LO
    R_PPC64_GOT_TLSGD16_HI     R_PPC64 = 81 // R_POWERPC_GOT_TLSGD16_HI
    R_PPC64_GOT_TLSGD16_HA     R_PPC64 = 82 // R_POWERPC_GOT_TLSGD16_HA
    R_PPC64_GOT_TLSLD16        R_PPC64 = 83 // R_POWERPC_GOT_TLSLD16
    R_PPC64_GOT_TLSLD16_LO     R_PPC64 = 84 // R_POWERPC_GOT_TLSLD16_LO
    R_PPC64_GOT_TLSLD16_HI     R_PPC64 = 85 // R_POWERPC_GOT_TLSLD16_HI
    R_PPC64_GOT_TLSLD16_HA     R_PPC64 = 86 // R_POWERPC_GOT_TLSLD16_HA
    R_PPC64_GOT_TPREL16_DS     R_PPC64 = 87 // R_POWERPC_GOT_TPREL16_DS
    R_PPC64_GOT_TPREL16_LO_DS  R_PPC64 = 88 // R_POWERPC_GOT_TPREL16_LO_DS
    R_PPC64_GOT_TPREL16_HI     R_PPC64 = 89 // R_POWERPC_GOT_TPREL16_HI
    R_PPC64_GOT_TPREL16_HA     R_PPC64 = 90 // R_POWERPC_GOT_TPREL16_HA
    R_PPC64_GOT_DTPREL16_DS    R_PPC64 = 91 // R_POWERPC_GOT_DTPREL16_DS
    R_PPC64_GOT_DTPREL16_LO_DS R_PPC64 = 92 // R_POWERPC_GOT_DTPREL16_LO_DS
    R_PPC64_GOT_DTPREL16_HI    R_PPC64 = 93 // R_POWERPC_GOT_DTPREL16_HI
    R_PPC64_GOT_DTPREL16_HA    R_PPC64 = 94 // R_POWERPC_GOT_DTPREL16_HA
    R_PPC64_TPREL16_DS         R_PPC64 = 95
    R_PPC64_TPREL16_LO_DS      R_PPC64 = 96
    R_PPC64_TPREL16_HIGHER     R_PPC64 = 97
    R_PPC64_TPREL16_HIGHERA    R_PPC64 = 98
    R_PPC64_TPREL16_HIGHEST    R_PPC64 = 99
    R_PPC64_TPREL16_HIGHESTA   R_PPC64 = 100
    R_PPC64_DTPREL16_DS        R_PPC64 = 101
    R_PPC64_DTPREL16_LO_DS     R_PPC64 = 102
    R_PPC64_DTPREL16_HIGHER    R_PPC64 = 103
    R_PPC64_DTPREL16_HIGHERA   R_PPC64 = 104
    R_PPC64_DTPREL16_HIGHEST   R_PPC64 = 105
    R_PPC64_DTPREL16_HIGHESTA  R_PPC64 = 106
    R_PPC64_TLSGD              R_PPC64 = 107
    R_PPC64_TLSLD              R_PPC64 = 108
    R_PPC64_TOCSAVE            R_PPC64 = 109
    R_PPC64_ADDR16_HIGH        R_PPC64 = 110
    R_PPC64_ADDR16_HIGHA       R_PPC64 = 111
    R_PPC64_TPREL16_HIGH       R_PPC64 = 112
    R_PPC64_TPREL16_HIGHA      R_PPC64 = 113
    R_PPC64_DTPREL16_HIGH      R_PPC64 = 114
    R_PPC64_DTPREL16_HIGHA     R_PPC64 = 115
    R_PPC64_REL24_NOTOC        R_PPC64 = 116
    R_PPC64_ADDR64_LOCAL       R_PPC64 = 117
    R_PPC64_ENTRY              R_PPC64 = 118
    R_PPC64_PLTSEQ             R_PPC64 = 119
    R_PPC64_PLTCALL            R_PPC64 = 120
    R_PPC64_PLTSEQ_NOTOC       R_PPC64 = 121
    R_PPC64_PLTCALL_NOTOC      R_PPC64 = 122
    R_PPC64_PCREL_OPT          R_PPC64 = 123
    R_PPC64_REL24_P9NOTOC      R_PPC64 = 124
    R_PPC64_D34                R_PPC64 = 128
    R_PPC64_D34_LO             R_PPC64 = 129
    R_PPC64_D34_HI30           R_PPC64 = 130
    R_PPC64_D34_HA30           R_PPC64 = 131
    R_PPC64_PCREL34            R_PPC64 = 132
    R_PPC64_GOT_PCREL34        R_PPC64 = 133
    R_PPC64_PLT_PCREL34        R_PPC64 = 134
    R_PPC64_PLT_PCREL34_NOTOC  R_PPC64 = 135
    R_PPC64_ADDR16_HIGHER34    R_PPC64 = 136
    R_PPC64_ADDR16_HIGHERA34   R_PPC64 = 137
    R_PPC64_ADDR16_HIGHEST34   R_PPC64 = 138
    R_PPC64_ADDR16_HIGHESTA34  R_PPC64 = 139
    R_PPC64_REL16_HIGHER34     R_PPC64 = 140
    R_PPC64_REL16_HIGHERA34    R_PPC64 = 141
    R_PPC64_REL16_HIGHEST34    R_PPC64 = 142
    R_PPC64_REL16_HIGHESTA34   R_PPC64 = 143
    R_PPC64_D28                R_PPC64 = 144
    R_PPC64_PCREL28            R_PPC64 = 145
    R_PPC64_TPREL34            R_PPC64 = 146
    R_PPC64_DTPREL34           R_PPC64 = 147
    R_PPC64_GOT_TLSGD_PCREL34  R_PPC64 = 148
    R_PPC64_GOT_TLSLD_PCREL34  R_PPC64 = 149
    R_PPC64_GOT_TPREL_PCREL34  R_PPC64 = 150
    R_PPC64_GOT_DTPREL_PCREL34 R_PPC64 = 151
    R_PPC64_REL16_HIGH         R_PPC64 = 240
    R_PPC64_REL16_HIGHA        R_PPC64 = 241
    R_PPC64_REL16_HIGHER       R_PPC64 = 242
    R_PPC64_REL16_HIGHERA      R_PPC64 = 243
    R_PPC64_REL16_HIGHEST      R_PPC64 = 244
    R_PPC64_REL16_HIGHESTA     R_PPC64 = 245
    R_PPC64_REL16DX_HA         R_PPC64 = 246 // R_POWERPC_REL16DX_HA
    R_PPC64_JMP_IREL           R_PPC64 = 247
    R_PPC64_IRELATIVE          R_PPC64 = 248 // R_POWERPC_IRELATIVE
    R_PPC64_REL16              R_PPC64 = 249 // R_POWERPC_REL16
    R_PPC64_REL16_LO           R_PPC64 = 250 // R_POWERPC_REL16_LO
    R_PPC64_REL16_HI           R_PPC64 = 251 // R_POWERPC_REL16_HI
    R_PPC64_REL16_HA           R_PPC64 = 252 // R_POWERPC_REL16_HA
    R_PPC64_GNU_VTINHERIT      R_PPC64 = 253
    R_PPC64_GNU_VTENTRY        R_PPC64 = 254
)</pre> <h3 id="R_PPC64.GoString">func (R_PPC64) <span>GoString</span>  <span title="Added in Go 1.5">1.5</span> </h3> <pre data-language="go">func (i R_PPC64) GoString() string</pre> <h3 id="R_PPC64.String">func (R_PPC64) <span>String</span>  <span title="Added in Go 1.5">1.5</span> </h3> <pre data-language="go">func (i R_PPC64) String() string</pre> <h2 id="R_RISCV">type <span>R_RISCV</span>  <span title="Added in Go 1.11">1.11</span> </h2> <p>Relocation types for RISC-V processors. </p>
<pre data-language="go">type R_RISCV int</pre> <pre data-language="go">const (
    R_RISCV_NONE          R_RISCV = 0  /* No relocation. */
    R_RISCV_32            R_RISCV = 1  /* Add 32 bit zero extended symbol value */
    R_RISCV_64            R_RISCV = 2  /* Add 64 bit symbol value. */
    R_RISCV_RELATIVE      R_RISCV = 3  /* Add load address of shared object. */
    R_RISCV_COPY          R_RISCV = 4  /* Copy data from shared object. */
    R_RISCV_JUMP_SLOT     R_RISCV = 5  /* Set GOT entry to code address. */
    R_RISCV_TLS_DTPMOD32  R_RISCV = 6  /* 32 bit ID of module containing symbol */
    R_RISCV_TLS_DTPMOD64  R_RISCV = 7  /* ID of module containing symbol */
    R_RISCV_TLS_DTPREL32  R_RISCV = 8  /* 32 bit relative offset in TLS block */
    R_RISCV_TLS_DTPREL64  R_RISCV = 9  /* Relative offset in TLS block */
    R_RISCV_TLS_TPREL32   R_RISCV = 10 /* 32 bit relative offset in static TLS block */
    R_RISCV_TLS_TPREL64   R_RISCV = 11 /* Relative offset in static TLS block */
    R_RISCV_BRANCH        R_RISCV = 16 /* PC-relative branch */
    R_RISCV_JAL           R_RISCV = 17 /* PC-relative jump */
    R_RISCV_CALL          R_RISCV = 18 /* PC-relative call */
    R_RISCV_CALL_PLT      R_RISCV = 19 /* PC-relative call (PLT) */
    R_RISCV_GOT_HI20      R_RISCV = 20 /* PC-relative GOT reference */
    R_RISCV_TLS_GOT_HI20  R_RISCV = 21 /* PC-relative TLS IE GOT offset */
    R_RISCV_TLS_GD_HI20   R_RISCV = 22 /* PC-relative TLS GD reference */
    R_RISCV_PCREL_HI20    R_RISCV = 23 /* PC-relative reference */
    R_RISCV_PCREL_LO12_I  R_RISCV = 24 /* PC-relative reference */
    R_RISCV_PCREL_LO12_S  R_RISCV = 25 /* PC-relative reference */
    R_RISCV_HI20          R_RISCV = 26 /* Absolute address */
    R_RISCV_LO12_I        R_RISCV = 27 /* Absolute address */
    R_RISCV_LO12_S        R_RISCV = 28 /* Absolute address */
    R_RISCV_TPREL_HI20    R_RISCV = 29 /* TLS LE thread offset */
    R_RISCV_TPREL_LO12_I  R_RISCV = 30 /* TLS LE thread offset */
    R_RISCV_TPREL_LO12_S  R_RISCV = 31 /* TLS LE thread offset */
    R_RISCV_TPREL_ADD     R_RISCV = 32 /* TLS LE thread usage */
    R_RISCV_ADD8          R_RISCV = 33 /* 8-bit label addition */
    R_RISCV_ADD16         R_RISCV = 34 /* 16-bit label addition */
    R_RISCV_ADD32         R_RISCV = 35 /* 32-bit label addition */
    R_RISCV_ADD64         R_RISCV = 36 /* 64-bit label addition */
    R_RISCV_SUB8          R_RISCV = 37 /* 8-bit label subtraction */
    R_RISCV_SUB16         R_RISCV = 38 /* 16-bit label subtraction */
    R_RISCV_SUB32         R_RISCV = 39 /* 32-bit label subtraction */
    R_RISCV_SUB64         R_RISCV = 40 /* 64-bit label subtraction */
    R_RISCV_GNU_VTINHERIT R_RISCV = 41 /* GNU C++ vtable hierarchy */
    R_RISCV_GNU_VTENTRY   R_RISCV = 42 /* GNU C++ vtable member usage */
    R_RISCV_ALIGN         R_RISCV = 43 /* Alignment statement */
    R_RISCV_RVC_BRANCH    R_RISCV = 44 /* PC-relative branch offset */
    R_RISCV_RVC_JUMP      R_RISCV = 45 /* PC-relative jump offset */
    R_RISCV_RVC_LUI       R_RISCV = 46 /* Absolute address */
    R_RISCV_GPREL_I       R_RISCV = 47 /* GP-relative reference */
    R_RISCV_GPREL_S       R_RISCV = 48 /* GP-relative reference */
    R_RISCV_TPREL_I       R_RISCV = 49 /* TP-relative TLS LE load */
    R_RISCV_TPREL_S       R_RISCV = 50 /* TP-relative TLS LE store */
    R_RISCV_RELAX         R_RISCV = 51 /* Instruction pair can be relaxed */
    R_RISCV_SUB6          R_RISCV = 52 /* Local label subtraction */
    R_RISCV_SET6          R_RISCV = 53 /* Local label subtraction */
    R_RISCV_SET8          R_RISCV = 54 /* Local label subtraction */
    R_RISCV_SET16         R_RISCV = 55 /* Local label subtraction */
    R_RISCV_SET32         R_RISCV = 56 /* Local label subtraction */
    R_RISCV_32_PCREL      R_RISCV = 57 /* 32-bit PC relative */
)</pre> <h3 id="R_RISCV.GoString">func (R_RISCV) <span>GoString</span>  <span title="Added in Go 1.11">1.11</span> </h3> <pre data-language="go">func (i R_RISCV) GoString() string</pre> <h3 id="R_RISCV.String">func (R_RISCV) <span>String</span>  <span title="Added in Go 1.11">1.11</span> </h3> <pre data-language="go">func (i R_RISCV) String() string</pre> <h2 id="R_SPARC">type <span>R_SPARC</span>  </h2> <p>Relocation types for SPARC. </p>
<pre data-language="go">type R_SPARC int</pre> <pre data-language="go">const (
    R_SPARC_NONE     R_SPARC = 0
    R_SPARC_8        R_SPARC = 1
    R_SPARC_16       R_SPARC = 2
    R_SPARC_32       R_SPARC = 3
    R_SPARC_DISP8    R_SPARC = 4
    R_SPARC_DISP16   R_SPARC = 5
    R_SPARC_DISP32   R_SPARC = 6
    R_SPARC_WDISP30  R_SPARC = 7
    R_SPARC_WDISP22  R_SPARC = 8
    R_SPARC_HI22     R_SPARC = 9
    R_SPARC_22       R_SPARC = 10
    R_SPARC_13       R_SPARC = 11
    R_SPARC_LO10     R_SPARC = 12
    R_SPARC_GOT10    R_SPARC = 13
    R_SPARC_GOT13    R_SPARC = 14
    R_SPARC_GOT22    R_SPARC = 15
    R_SPARC_PC10     R_SPARC = 16
    R_SPARC_PC22     R_SPARC = 17
    R_SPARC_WPLT30   R_SPARC = 18
    R_SPARC_COPY     R_SPARC = 19
    R_SPARC_GLOB_DAT R_SPARC = 20
    R_SPARC_JMP_SLOT R_SPARC = 21
    R_SPARC_RELATIVE R_SPARC = 22
    R_SPARC_UA32     R_SPARC = 23
    R_SPARC_PLT32    R_SPARC = 24
    R_SPARC_HIPLT22  R_SPARC = 25
    R_SPARC_LOPLT10  R_SPARC = 26
    R_SPARC_PCPLT32  R_SPARC = 27
    R_SPARC_PCPLT22  R_SPARC = 28
    R_SPARC_PCPLT10  R_SPARC = 29
    R_SPARC_10       R_SPARC = 30
    R_SPARC_11       R_SPARC = 31
    R_SPARC_64       R_SPARC = 32
    R_SPARC_OLO10    R_SPARC = 33
    R_SPARC_HH22     R_SPARC = 34
    R_SPARC_HM10     R_SPARC = 35
    R_SPARC_LM22     R_SPARC = 36
    R_SPARC_PC_HH22  R_SPARC = 37
    R_SPARC_PC_HM10  R_SPARC = 38
    R_SPARC_PC_LM22  R_SPARC = 39
    R_SPARC_WDISP16  R_SPARC = 40
    R_SPARC_WDISP19  R_SPARC = 41
    R_SPARC_GLOB_JMP R_SPARC = 42
    R_SPARC_7        R_SPARC = 43
    R_SPARC_5        R_SPARC = 44
    R_SPARC_6        R_SPARC = 45
    R_SPARC_DISP64   R_SPARC = 46
    R_SPARC_PLT64    R_SPARC = 47
    R_SPARC_HIX22    R_SPARC = 48
    R_SPARC_LOX10    R_SPARC = 49
    R_SPARC_H44      R_SPARC = 50
    R_SPARC_M44      R_SPARC = 51
    R_SPARC_L44      R_SPARC = 52
    R_SPARC_REGISTER R_SPARC = 53
    R_SPARC_UA64     R_SPARC = 54
    R_SPARC_UA16     R_SPARC = 55
)</pre> <h3 id="R_SPARC.GoString">func (R_SPARC) <span>GoString</span>  </h3> <pre data-language="go">func (i R_SPARC) GoString() string</pre> <h3 id="R_SPARC.String">func (R_SPARC) <span>String</span>  </h3> <pre data-language="go">func (i R_SPARC) String() string</pre> <h2 id="R_X86_64">type <span>R_X86_64</span>  </h2> <p>Relocation types for x86-64. </p>
<pre data-language="go">type R_X86_64 int</pre> <pre data-language="go">const (
    R_X86_64_NONE            R_X86_64 = 0  /* No relocation. */
    R_X86_64_64              R_X86_64 = 1  /* Add 64 bit symbol value. */
    R_X86_64_PC32            R_X86_64 = 2  /* PC-relative 32 bit signed sym value. */
    R_X86_64_GOT32           R_X86_64 = 3  /* PC-relative 32 bit GOT offset. */
    R_X86_64_PLT32           R_X86_64 = 4  /* PC-relative 32 bit PLT offset. */
    R_X86_64_COPY            R_X86_64 = 5  /* Copy data from shared object. */
    R_X86_64_GLOB_DAT        R_X86_64 = 6  /* Set GOT entry to data address. */
    R_X86_64_JMP_SLOT        R_X86_64 = 7  /* Set GOT entry to code address. */
    R_X86_64_RELATIVE        R_X86_64 = 8  /* Add load address of shared object. */
    R_X86_64_GOTPCREL        R_X86_64 = 9  /* Add 32 bit signed pcrel offset to GOT. */
    R_X86_64_32              R_X86_64 = 10 /* Add 32 bit zero extended symbol value */
    R_X86_64_32S             R_X86_64 = 11 /* Add 32 bit sign extended symbol value */
    R_X86_64_16              R_X86_64 = 12 /* Add 16 bit zero extended symbol value */
    R_X86_64_PC16            R_X86_64 = 13 /* Add 16 bit signed extended pc relative symbol value */
    R_X86_64_8               R_X86_64 = 14 /* Add 8 bit zero extended symbol value */
    R_X86_64_PC8             R_X86_64 = 15 /* Add 8 bit signed extended pc relative symbol value */
    R_X86_64_DTPMOD64        R_X86_64 = 16 /* ID of module containing symbol */
    R_X86_64_DTPOFF64        R_X86_64 = 17 /* Offset in TLS block */
    R_X86_64_TPOFF64         R_X86_64 = 18 /* Offset in static TLS block */
    R_X86_64_TLSGD           R_X86_64 = 19 /* PC relative offset to GD GOT entry */
    R_X86_64_TLSLD           R_X86_64 = 20 /* PC relative offset to LD GOT entry */
    R_X86_64_DTPOFF32        R_X86_64 = 21 /* Offset in TLS block */
    R_X86_64_GOTTPOFF        R_X86_64 = 22 /* PC relative offset to IE GOT entry */
    R_X86_64_TPOFF32         R_X86_64 = 23 /* Offset in static TLS block */
    R_X86_64_PC64            R_X86_64 = 24 /* PC relative 64-bit sign extended symbol value. */
    R_X86_64_GOTOFF64        R_X86_64 = 25
    R_X86_64_GOTPC32         R_X86_64 = 26
    R_X86_64_GOT64           R_X86_64 = 27
    R_X86_64_GOTPCREL64      R_X86_64 = 28
    R_X86_64_GOTPC64         R_X86_64 = 29
    R_X86_64_GOTPLT64        R_X86_64 = 30
    R_X86_64_PLTOFF64        R_X86_64 = 31
    R_X86_64_SIZE32          R_X86_64 = 32
    R_X86_64_SIZE64          R_X86_64 = 33
    R_X86_64_GOTPC32_TLSDESC R_X86_64 = 34
    R_X86_64_TLSDESC_CALL    R_X86_64 = 35
    R_X86_64_TLSDESC         R_X86_64 = 36
    R_X86_64_IRELATIVE       R_X86_64 = 37
    R_X86_64_RELATIVE64      R_X86_64 = 38
    R_X86_64_PC32_BND        R_X86_64 = 39
    R_X86_64_PLT32_BND       R_X86_64 = 40
    R_X86_64_GOTPCRELX       R_X86_64 = 41
    R_X86_64_REX_GOTPCRELX   R_X86_64 = 42
)</pre> <h3 id="R_X86_64.GoString">func (R_X86_64) <span>GoString</span>  </h3> <pre data-language="go">func (i R_X86_64) GoString() string</pre> <h3 id="R_X86_64.String">func (R_X86_64) <span>String</span>  </h3> <pre data-language="go">func (i R_X86_64) String() string</pre> <h2 id="Rel32">type <span>Rel32</span>  </h2> <p>ELF32 Relocations that don't need an addend field. </p>
<pre data-language="go">type Rel32 struct {
    Off  uint32 /* Location to be relocated. */
    Info uint32 /* Relocation type and symbol index. */
}
</pre> <h2 id="Rel64">type <span>Rel64</span>  </h2> <p>ELF64 relocations that don't need an addend field. </p>
<pre data-language="go">type Rel64 struct {
    Off  uint64 /* Location to be relocated. */
    Info uint64 /* Relocation type and symbol index. */
}
</pre> <h2 id="Rela32">type <span>Rela32</span>  </h2> <p>ELF32 Relocations that need an addend field. </p>
<pre data-language="go">type Rela32 struct {
    Off    uint32 /* Location to be relocated. */
    Info   uint32 /* Relocation type and symbol index. */
    Addend int32  /* Addend. */
}
</pre> <h2 id="Rela64">type <span>Rela64</span>  </h2> <p>ELF64 relocations that need an addend field. </p>
<pre data-language="go">type Rela64 struct {
    Off    uint64 /* Location to be relocated. */
    Info   uint64 /* Relocation type and symbol index. */
    Addend int64  /* Addend. */
}
</pre> <h2 id="Section">type <span>Section</span>  </h2> <p>A Section represents a single section in an ELF file. </p>
<pre data-language="go">type Section struct {
    SectionHeader

    // Embed ReaderAt for ReadAt method.
    // Do not embed SectionReader directly
    // to avoid having Read and Seek.
    // If a client wants Read and Seek it must use
    // Open() to avoid fighting over the seek offset
    // with other clients.
    //
    // ReaderAt may be nil if the section is not easily available
    // in a random-access form. For example, a compressed section
    // may have a nil ReaderAt.
    io.ReaderAt
    // contains filtered or unexported fields
}
</pre> <h3 id="Section.Data">func (*Section) <span>Data</span>  </h3> <pre data-language="go">func (s *Section) Data() ([]byte, error)</pre> <p>Data reads and returns the contents of the ELF section. Even if the section is stored compressed in the ELF file, Data returns uncompressed data. </p>
<p>For an <a href="#SHT_NOBITS">SHT_NOBITS</a> section, Data always returns a non-nil error. </p>
<h3 id="Section.Open">func (*Section) <span>Open</span>  </h3> <pre data-language="go">func (s *Section) Open() io.ReadSeeker</pre> <p>Open returns a new ReadSeeker reading the ELF section. Even if the section is stored compressed in the ELF file, the ReadSeeker reads uncompressed data. </p>
<p>For an <a href="#SHT_NOBITS">SHT_NOBITS</a> section, all calls to the opened reader will return a non-nil error. </p>
<h2 id="Section32">type <span>Section32</span>  </h2> <p>ELF32 Section header. </p>
<pre data-language="go">type Section32 struct {
    Name      uint32 /* Section name (index into the section header string table). */
    Type      uint32 /* Section type. */
    Flags     uint32 /* Section flags. */
    Addr      uint32 /* Address in memory image. */
    Off       uint32 /* Offset in file. */
    Size      uint32 /* Size in bytes. */
    Link      uint32 /* Index of a related section. */
    Info      uint32 /* Depends on section type. */
    Addralign uint32 /* Alignment in bytes. */
    Entsize   uint32 /* Size of each entry in section. */
}
</pre> <h2 id="Section64">type <span>Section64</span>  </h2> <p>ELF64 Section header. </p>
<pre data-language="go">type Section64 struct {
    Name      uint32 /* Section name (index into the section header string table). */
    Type      uint32 /* Section type. */
    Flags     uint64 /* Section flags. */
    Addr      uint64 /* Address in memory image. */
    Off       uint64 /* Offset in file. */
    Size      uint64 /* Size in bytes. */
    Link      uint32 /* Index of a related section. */
    Info      uint32 /* Depends on section type. */
    Addralign uint64 /* Alignment in bytes. */
    Entsize   uint64 /* Size of each entry in section. */
}
</pre> <h2 id="SectionFlag">type <span>SectionFlag</span>  </h2> <p>Section flags. </p>
<pre data-language="go">type SectionFlag uint32</pre> <pre data-language="go">const (
    SHF_WRITE            SectionFlag = 0x1        /* Section contains writable data. */
    SHF_ALLOC            SectionFlag = 0x2        /* Section occupies memory. */
    SHF_EXECINSTR        SectionFlag = 0x4        /* Section contains instructions. */
    SHF_MERGE            SectionFlag = 0x10       /* Section may be merged. */
    SHF_STRINGS          SectionFlag = 0x20       /* Section contains strings. */
    SHF_INFO_LINK        SectionFlag = 0x40       /* sh_info holds section index. */
    SHF_LINK_ORDER       SectionFlag = 0x80       /* Special ordering requirements. */
    SHF_OS_NONCONFORMING SectionFlag = 0x100      /* OS-specific processing required. */
    SHF_GROUP            SectionFlag = 0x200      /* Member of section group. */
    SHF_TLS              SectionFlag = 0x400      /* Section contains TLS data. */
    SHF_COMPRESSED       SectionFlag = 0x800      /* Section is compressed. */
    SHF_MASKOS           SectionFlag = 0x0ff00000 /* OS-specific semantics. */
    SHF_MASKPROC         SectionFlag = 0xf0000000 /* Processor-specific semantics. */
)</pre> <h3 id="SectionFlag.GoString">func (SectionFlag) <span>GoString</span>  </h3> <pre data-language="go">func (i SectionFlag) GoString() string</pre> <h3 id="SectionFlag.String">func (SectionFlag) <span>String</span>  </h3> <pre data-language="go">func (i SectionFlag) String() string</pre> <h2 id="SectionHeader">type <span>SectionHeader</span>  </h2> <p>A SectionHeader represents a single ELF section header. </p>
<pre data-language="go">type SectionHeader struct {
    Name      string
    Type      SectionType
    Flags     SectionFlag
    Addr      uint64
    Offset    uint64
    Size      uint64
    Link      uint32
    Info      uint32
    Addralign uint64
    Entsize   uint64

    // FileSize is the size of this section in the file in bytes.
    // If a section is compressed, FileSize is the size of the
    // compressed data, while Size (above) is the size of the
    // uncompressed data.
    FileSize uint64 // Go 1.6
}
</pre> <h2 id="SectionIndex">type <span>SectionIndex</span>  </h2> <p>Special section indices. </p>
<pre data-language="go">type SectionIndex int</pre> <pre data-language="go">const (
    SHN_UNDEF     SectionIndex = 0      /* Undefined, missing, irrelevant. */
    SHN_LORESERVE SectionIndex = 0xff00 /* First of reserved range. */
    SHN_LOPROC    SectionIndex = 0xff00 /* First processor-specific. */
    SHN_HIPROC    SectionIndex = 0xff1f /* Last processor-specific. */
    SHN_LOOS      SectionIndex = 0xff20 /* First operating system-specific. */
    SHN_HIOS      SectionIndex = 0xff3f /* Last operating system-specific. */
    SHN_ABS       SectionIndex = 0xfff1 /* Absolute values. */
    SHN_COMMON    SectionIndex = 0xfff2 /* Common data. */
    SHN_XINDEX    SectionIndex = 0xffff /* Escape; index stored elsewhere. */
    SHN_HIRESERVE SectionIndex = 0xffff /* Last of reserved range. */
)</pre> <h3 id="SectionIndex.GoString">func (SectionIndex) <span>GoString</span>  </h3> <pre data-language="go">func (i SectionIndex) GoString() string</pre> <h3 id="SectionIndex.String">func (SectionIndex) <span>String</span>  </h3> <pre data-language="go">func (i SectionIndex) String() string</pre> <h2 id="SectionType">type <span>SectionType</span>  </h2> <p>Section type. </p>
<pre data-language="go">type SectionType uint32</pre> <pre data-language="go">const (
    SHT_NULL           SectionType = 0          /* inactive */
    SHT_PROGBITS       SectionType = 1          /* program defined information */
    SHT_SYMTAB         SectionType = 2          /* symbol table section */
    SHT_STRTAB         SectionType = 3          /* string table section */
    SHT_RELA           SectionType = 4          /* relocation section with addends */
    SHT_HASH           SectionType = 5          /* symbol hash table section */
    SHT_DYNAMIC        SectionType = 6          /* dynamic section */
    SHT_NOTE           SectionType = 7          /* note section */
    SHT_NOBITS         SectionType = 8          /* no space section */
    SHT_REL            SectionType = 9          /* relocation section - no addends */
    SHT_SHLIB          SectionType = 10         /* reserved - purpose unknown */
    SHT_DYNSYM         SectionType = 11         /* dynamic symbol table section */
    SHT_INIT_ARRAY     SectionType = 14         /* Initialization function pointers. */
    SHT_FINI_ARRAY     SectionType = 15         /* Termination function pointers. */
    SHT_PREINIT_ARRAY  SectionType = 16         /* Pre-initialization function ptrs. */
    SHT_GROUP          SectionType = 17         /* Section group. */
    SHT_SYMTAB_SHNDX   SectionType = 18         /* Section indexes (see SHN_XINDEX). */
    SHT_LOOS           SectionType = 0x60000000 /* First of OS specific semantics */
    SHT_GNU_ATTRIBUTES SectionType = 0x6ffffff5 /* GNU object attributes */
    SHT_GNU_HASH       SectionType = 0x6ffffff6 /* GNU hash table */
    SHT_GNU_LIBLIST    SectionType = 0x6ffffff7 /* GNU prelink library list */
    SHT_GNU_VERDEF     SectionType = 0x6ffffffd /* GNU version definition section */
    SHT_GNU_VERNEED    SectionType = 0x6ffffffe /* GNU version needs section */
    SHT_GNU_VERSYM     SectionType = 0x6fffffff /* GNU version symbol table */
    SHT_HIOS           SectionType = 0x6fffffff /* Last of OS specific semantics */
    SHT_LOPROC         SectionType = 0x70000000 /* reserved range for processor */
    SHT_MIPS_ABIFLAGS  SectionType = 0x7000002a /* .MIPS.abiflags */
    SHT_HIPROC         SectionType = 0x7fffffff /* specific section header types */
    SHT_LOUSER         SectionType = 0x80000000 /* reserved range for application */
    SHT_HIUSER         SectionType = 0xffffffff /* specific indexes */
)</pre> <h3 id="SectionType.GoString">func (SectionType) <span>GoString</span>  </h3> <pre data-language="go">func (i SectionType) GoString() string</pre> <h3 id="SectionType.String">func (SectionType) <span>String</span>  </h3> <pre data-language="go">func (i SectionType) String() string</pre> <h2 id="Sym32">type <span>Sym32</span>  </h2> <p>ELF32 Symbol. </p>
<pre data-language="go">type Sym32 struct {
    Name  uint32
    Value uint32
    Size  uint32
    Info  uint8
    Other uint8
    Shndx uint16
}
</pre> <h2 id="Sym64">type <span>Sym64</span>  </h2> <p>ELF64 symbol table entries. </p>
<pre data-language="go">type Sym64 struct {
    Name  uint32 /* String table index of name. */
    Info  uint8  /* Type and binding information. */
    Other uint8  /* Reserved (not used). */
    Shndx uint16 /* Section index of symbol. */
    Value uint64 /* Symbol value. */
    Size  uint64 /* Size of associated object. */
}
</pre> <h2 id="SymBind">type <span>SymBind</span>  </h2> <p>Symbol Binding - ELFNN_ST_BIND - st_info </p>
<pre data-language="go">type SymBind int</pre> <pre data-language="go">const (
    STB_LOCAL  SymBind = 0  /* Local symbol */
    STB_GLOBAL SymBind = 1  /* Global symbol */
    STB_WEAK   SymBind = 2  /* like global - lower precedence */
    STB_LOOS   SymBind = 10 /* Reserved range for operating system */
    STB_HIOS   SymBind = 12 /*   specific semantics. */
    STB_LOPROC SymBind = 13 /* reserved range for processor */
    STB_HIPROC SymBind = 15 /*   specific semantics. */
)</pre> <h3 id="ST_BIND">func <span>ST_BIND</span>  </h3> <pre data-language="go">func ST_BIND(info uint8) SymBind</pre> <h3 id="SymBind.GoString">func (SymBind) <span>GoString</span>  </h3> <pre data-language="go">func (i SymBind) GoString() string</pre> <h3 id="SymBind.String">func (SymBind) <span>String</span>  </h3> <pre data-language="go">func (i SymBind) String() string</pre> <h2 id="SymType">type <span>SymType</span>  </h2> <p>Symbol type - ELFNN_ST_TYPE - st_info </p>
<pre data-language="go">type SymType int</pre> <pre data-language="go">const (
    STT_NOTYPE  SymType = 0  /* Unspecified type. */
    STT_OBJECT  SymType = 1  /* Data object. */
    STT_FUNC    SymType = 2  /* Function. */
    STT_SECTION SymType = 3  /* Section. */
    STT_FILE    SymType = 4  /* Source file. */
    STT_COMMON  SymType = 5  /* Uninitialized common block. */
    STT_TLS     SymType = 6  /* TLS object. */
    STT_LOOS    SymType = 10 /* Reserved range for operating system */
    STT_HIOS    SymType = 12 /*   specific semantics. */
    STT_LOPROC  SymType = 13 /* reserved range for processor */
    STT_HIPROC  SymType = 15 /*   specific semantics. */
)</pre> <h3 id="ST_TYPE">func <span>ST_TYPE</span>  </h3> <pre data-language="go">func ST_TYPE(info uint8) SymType</pre> <h3 id="SymType.GoString">func (SymType) <span>GoString</span>  </h3> <pre data-language="go">func (i SymType) GoString() string</pre> <h3 id="SymType.String">func (SymType) <span>String</span>  </h3> <pre data-language="go">func (i SymType) String() string</pre> <h2 id="SymVis">type <span>SymVis</span>  </h2> <p>Symbol visibility - ELFNN_ST_VISIBILITY - st_other </p>
<pre data-language="go">type SymVis int</pre> <pre data-language="go">const (
    STV_DEFAULT   SymVis = 0x0 /* Default visibility (see binding). */
    STV_INTERNAL  SymVis = 0x1 /* Special meaning in relocatable objects. */
    STV_HIDDEN    SymVis = 0x2 /* Not visible. */
    STV_PROTECTED SymVis = 0x3 /* Visible but not preemptible. */
)</pre> <h3 id="ST_VISIBILITY">func <span>ST_VISIBILITY</span>  </h3> <pre data-language="go">func ST_VISIBILITY(other uint8) SymVis</pre> <h3 id="SymVis.GoString">func (SymVis) <span>GoString</span>  </h3> <pre data-language="go">func (i SymVis) GoString() string</pre> <h3 id="SymVis.String">func (SymVis) <span>String</span>  </h3> <pre data-language="go">func (i SymVis) String() string</pre> <h2 id="Symbol">type <span>Symbol</span>  </h2> <p>A Symbol represents an entry in an ELF symbol table section. </p>
<pre data-language="go">type Symbol struct {
    Name        string
    Info, Other byte
    Section     SectionIndex
    Value, Size uint64

    // Version and Library are present only for the dynamic symbol
    // table.
    Version string // Go 1.13
    Library string // Go 1.13
}
</pre> <h2 id="Type">type <span>Type</span>  </h2> <p>Type is found in Header.Type. </p>
<pre data-language="go">type Type uint16</pre> <pre data-language="go">const (
    ET_NONE   Type = 0      /* Unknown type. */
    ET_REL    Type = 1      /* Relocatable. */
    ET_EXEC   Type = 2      /* Executable. */
    ET_DYN    Type = 3      /* Shared object. */
    ET_CORE   Type = 4      /* Core file. */
    ET_LOOS   Type = 0xfe00 /* First operating system specific. */
    ET_HIOS   Type = 0xfeff /* Last operating system-specific. */
    ET_LOPROC Type = 0xff00 /* First processor-specific. */
    ET_HIPROC Type = 0xffff /* Last processor-specific. */
)</pre> <h3 id="Type.GoString">func (Type) <span>GoString</span>  </h3> <pre data-language="go">func (i Type) GoString() string</pre> <h3 id="Type.String">func (Type) <span>String</span>  </h3> <pre data-language="go">func (i Type) String() string</pre> <h2 id="Version">type <span>Version</span>  </h2> <p>Version is found in Header.Ident[EI_VERSION] and Header.Version. </p>
<pre data-language="go">type Version byte</pre> <pre data-language="go">const (
    EV_NONE    Version = 0
    EV_CURRENT Version = 1
)</pre> <h3 id="Version.GoString">func (Version) <span>GoString</span>  </h3> <pre data-language="go">func (i Version) GoString() string</pre> <h3 id="Version.String">func (Version) <span>String</span>  </h3> <pre data-language="go">func (i Version) String() string</pre><div class="_attribution">
  <p class="_attribution-p">
    &copy; Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br>
    <a href="http://golang.org/pkg/debug/elf/" class="_attribution-link">http://golang.org/pkg/debug/elf/</a>
  </p>
</div>