Lines Matching refs:swap

76 getu16(int swap, uint16_t value)  in getu16()  argument
83 if (swap) { in getu16()
95 getu32(int swap, uint32_t value) in getu32() argument
102 if (swap) { in getu32()
116 getu64(int swap, uint64_t value) in getu64() argument
123 if (swap) { in getu64()
140 #define elf_getu16(swap, value) getu16(swap, value) argument
141 #define elf_getu32(swap, value) getu32(swap, value) argument
142 #define elf_getu64(swap, value) getu64(swap, value) argument
151 ? elf_getu32(swap, sh32.sh_size) \
152 : elf_getu64(swap, sh64.sh_size)))
154 ? elf_getu32(swap, sh32.sh_offset) \
155 : elf_getu64(swap, sh64.sh_offset)))
157 ? elf_getu32(swap, sh32.sh_type) \
158 : elf_getu32(swap, sh64.sh_type))
160 ? elf_getu32(swap, sh32.sh_name) \
161 : elf_getu32(swap, sh64.sh_name))
170 ? elf_getu32(swap, ph32.p_type) \
171 : elf_getu32(swap, ph64.p_type))
173 ? elf_getu32(swap, ph32.p_offset) \
174 : elf_getu64(swap, ph64.p_offset)))
177 elf_getu32(swap, ph32.p_align) : 4))\
179 elf_getu64(swap, ph64.p_align) : 4))))
182 elf_getu32(swap, ph32.p_vaddr) : 4))\
184 elf_getu64(swap, ph64.p_vaddr) : 4))))
186 ? elf_getu32(swap, ph32.p_filesz) \
187 : elf_getu64(swap, ph64.p_filesz)))
189 ? elf_getu32(swap, ph32.p_memsz) \
190 : elf_getu64(swap, ph64.p_memsz))))
198 ? elf_getu32(swap, nh32.n_type) \
199 : elf_getu32(swap, nh64.n_type))
201 ? elf_getu32(swap, nh32.n_namesz) \
202 : elf_getu32(swap, nh64.n_namesz))
204 ? elf_getu32(swap, nh32.n_descsz) \
205 : elf_getu32(swap, nh64.n_descsz))
214 ? elf_getu32(swap, dh32.d_tag) \
215 : elf_getu64(swap, dh64.d_tag))
217 ? elf_getu32(swap, dh32.d_un.d_val) \
218 : elf_getu64(swap, dh64.d_un.d_val))
227 ? elf_getu32(swap, cap32.c_tag) \
228 : elf_getu64(swap, cap64.c_tag))
230 ? elf_getu32(swap, cap32.c_un.c_val) \
231 : elf_getu64(swap, cap64.c_un.c_val))
240 ? elf_getu32(swap, auxv32.a_type) \
241 : elf_getu64(swap, auxv64.a_type))
243 ? elf_getu32(swap, auxv32.a_v) \
244 : elf_getu64(swap, auxv64.a_v))
347 dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off, in dophn_core() argument
411 clazz, swap, 4, flags, notecount, fd, ph_off, in dophn_core()
423 do_note_netbsd_version(struct magic_set *ms, int swap, void *v) in do_note_netbsd_version() argument
427 desc = elf_getu32(swap, desc); in do_note_netbsd_version()
472 do_note_freebsd_version(struct magic_set *ms, int swap, void *v) in do_note_freebsd_version() argument
477 desc = elf_getu32(swap, desc); in do_note_freebsd_version()
550 int swap __attribute__((__unused__)), uint32_t namesz, uint32_t descsz, in do_bid_note() argument
595 int swap, uint32_t namesz, uint32_t descsz, in do_os_note() argument
617 switch (elf_getu32(swap, desc[0])) { in do_os_note()
642 if (file_printf(ms, " %d.%d.%d", elf_getu32(swap, desc[1]), in do_os_note()
643 elf_getu32(swap, desc[2]), elf_getu32(swap, desc[3])) == -1) in do_os_note()
651 if (do_note_netbsd_version(ms, swap, &nbuf[doff]) == -1) in do_os_note()
660 if (do_note_freebsd_version(ms, swap, &nbuf[doff]) in do_os_note()
683 desc = elf_getu32(swap, desc); in do_os_note()
694 int swap, uint32_t namesz, uint32_t descsz, in do_pax_note() argument
715 desc = elf_getu32(swap, desc); in do_pax_note()
734 int swap, uint32_t namesz, uint32_t descsz, in do_core_note() argument
790 elf_getu32(swap, CAST(uint32_t, pi.cpi_pid)), in do_core_note()
791 elf_getu32(swap, pi.cpi_euid), in do_core_note()
792 elf_getu32(swap, pi.cpi_egid), in do_core_note()
793 elf_getu32(swap, pi.cpi_nlwps), in do_core_note()
794 elf_getu32(swap, CAST(uint32_t, pi.cpi_siglwp)), in do_core_note()
795 elf_getu32(swap, pi.cpi_signo), in do_core_note()
796 elf_getu32(swap, pi.cpi_sigcode)) == -1) in do_core_note()
818 elf_getu32(swap, *RCAST(uint32_t *, (nbuf + in do_core_note()
945 get_offset_from_virtaddr(struct magic_set *ms, int swap, int clazz, int fd, in get_offset_from_virtaddr() argument
980 int swap, int clazz, int fd, off_t ph_off, int ph_num, in get_string_on_virtaddr() argument
989 offset = get_offset_from_virtaddr(ms, swap, clazz, fd, ph_off, ph_num, in get_string_on_virtaddr()
1014 int swap, uint32_t namesz __attribute__((__unused__)), in do_auxv_note() argument
1099 buflen = get_string_on_virtaddr(ms, swap, clazz, fd, in do_auxv_note()
1121 int clazz, int swap, int *pie, size_t *need) in dodynamic() argument
1157 int clazz, int swap, size_t align, int *flags, uint16_t *notecount, in donote() argument
1226 if (do_os_note(ms, nbuf, xnh_type, swap, in donote()
1232 if (do_bid_note(ms, nbuf, xnh_type, swap, in donote()
1238 if (do_pax_note(ms, nbuf, xnh_type, swap, in donote()
1244 if (do_core_note(ms, nbuf, xnh_type, swap, in donote()
1250 if (do_auxv_note(ms, nbuf, xnh_type, swap, in donote()
1349 doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, in doshn() argument
1480 xsh_size, clazz, swap, 4, flags, notecount, in doshn()
1526 len = getu32(swap, len); in doshn()
1538 len = getu32(swap, len); in doshn()
1655 dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, in dophn_exec() argument
1750 CAST(size_t, bufsize), clazz, swap, in dophn_exec()
1781 CAST(size_t, bufsize), clazz, swap, align, in dophn_exec()
1824 int swap; in file_tryelf() local