@isopodlabs/binary_libs 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/elf.d.ts ADDED
@@ -0,0 +1,112 @@
1
+ import * as binary from '@isopodlabs/binary';
2
+ export declare class ELFFile {
3
+ segments: [string, {
4
+ data: binary.MappedMemory;
5
+ p_type: string;
6
+ p_flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
7
+ p_offset: number | bigint;
8
+ p_vaddr: binary.hex<number | bigint>;
9
+ p_paddr: binary.hex<number | bigint>;
10
+ p_filesz: number | bigint;
11
+ p_memsz: number | bigint;
12
+ p_align: number | bigint;
13
+ }][];
14
+ sections: [string, {
15
+ data: binary.MappedMemory;
16
+ sh_name: number;
17
+ sh_type: string;
18
+ sh_flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
19
+ sh_addr: binary.hex<number | bigint>;
20
+ sh_offset: number | bigint;
21
+ sh_size: number | bigint;
22
+ sh_link: number;
23
+ sh_info: number;
24
+ sh_addralign: number | bigint;
25
+ sh_entsize: number | bigint;
26
+ }][];
27
+ header: {
28
+ e_type: string;
29
+ e_machine: string;
30
+ e_version: string;
31
+ e_entry: binary.hex<number | bigint>;
32
+ e_phoff: number | bigint;
33
+ e_shoff: number | bigint;
34
+ e_flags: number;
35
+ e_ehsize: number;
36
+ e_phentsize: number;
37
+ e_phnum: number;
38
+ e_shentsize: number;
39
+ e_shnum: number;
40
+ e_shstrndx: number;
41
+ };
42
+ static check(data: Uint8Array): boolean;
43
+ getDynamic: () => {
44
+ d_tag: string;
45
+ d_val: number | bigint;
46
+ }[] | undefined;
47
+ getRel: () => {
48
+ r_offset: binary.hex<number | bigint>;
49
+ r_info: never;
50
+ }[] | undefined;
51
+ getRelA: () => {
52
+ r_addend: number | bigint;
53
+ r_offset: binary.hex<number | bigint>;
54
+ r_info: never;
55
+ }[] | undefined;
56
+ getSymbols: () => [string, {
57
+ st_info: {
58
+ type: string;
59
+ binding: string;
60
+ };
61
+ st_other: {
62
+ visibility: string;
63
+ other: number | bigint;
64
+ };
65
+ st_shndx: string;
66
+ st_value: binary.hex<number | bigint>;
67
+ st_size: number | bigint;
68
+ data: binary.MappedMemory | undefined;
69
+ st_name: number;
70
+ }][] | undefined;
71
+ getDynamicSymbols: () => [string, {
72
+ st_info: {
73
+ type: string;
74
+ binding: string;
75
+ };
76
+ st_other: {
77
+ visibility: string;
78
+ other: number | bigint;
79
+ };
80
+ st_shndx: string;
81
+ st_value: binary.hex<number | bigint>;
82
+ st_size: number | bigint;
83
+ data: binary.MappedMemory | undefined;
84
+ st_name: number;
85
+ }][] | undefined;
86
+ constructor(data: Uint8Array);
87
+ getSegmentByType(type: "TLS" | "LOOS" | "HIOS" | "LOPROC" | "HIPROC" | "NULL" | "LOAD" | "DYNAMIC" | "INTERP" | "NOTE" | "SHLIB" | "PHDR" | "UNWIND" | "EH_FRAME" | "GNU_STACK" | "GNU_RELRO" | "OS_SCE"): {
88
+ data: binary.MappedMemory;
89
+ p_type: string;
90
+ p_flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
91
+ p_offset: number | bigint;
92
+ p_vaddr: binary.hex<number | bigint>;
93
+ p_paddr: binary.hex<number | bigint>;
94
+ p_filesz: number | bigint;
95
+ p_memsz: number | bigint;
96
+ p_align: number | bigint;
97
+ } | undefined;
98
+ getSectionByType(type: "LOOS" | "HIOS" | "LOPROC" | "HIPROC" | "REL" | "NULL" | "DYNAMIC" | "NOTE" | "SHLIB" | "PROGBITS" | "SYMTAB" | "STRTAB" | "RELA" | "HASH" | "NOBITS" | "DYNSYM" | "LOUSER" | "HIUSER" | "PS3_RELA"): {
99
+ data: binary.MappedMemory;
100
+ sh_name: number;
101
+ sh_type: string;
102
+ sh_flags: Record<string, bigint | boolean> | Record<string, number | boolean>;
103
+ sh_addr: binary.hex<number | bigint>;
104
+ sh_offset: number | bigint;
105
+ sh_size: number | bigint;
106
+ sh_link: number;
107
+ sh_info: number;
108
+ sh_addralign: number | bigint;
109
+ sh_entsize: number | bigint;
110
+ } | undefined;
111
+ }
112
+ export {};