Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #include <libunwind-arm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #include <stdlib.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 					       unw_word_t ip,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 					       unw_dyn_info_t *di,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 					       unw_proc_info_t *pi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 					       int need_unwind_info, void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) static unw_accessors_t accessors;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int main(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	unw_addr_space_t addr_space;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	addr_space = unw_create_addr_space(&accessors, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	if (addr_space)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	unw_init_remote(NULL, addr_space, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) }