Some checks failed
Build Firmware / cyd-2432s024c (push) Has been cancelled
Build Firmware / cyd-2432s028r (push) Has been cancelled
Build Firmware / cyd-e32r28t (push) Has been cancelled
Build Firmware / cyd-2432s032c (push) Has been cancelled
Build Firmware / cyd-jc2432w328c (push) Has been cancelled
Build Firmware / cyd-8048s043c (push) Has been cancelled
Build Firmware / cyd-jc8048w550c (push) Has been cancelled
Build Firmware / cyd-4848s040c (push) Has been cancelled
Build Firmware / elecrow-crowpanel-advance-28 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-advance-35 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-advance-50 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-basic-28 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-basic-35 (push) Has been cancelled
Build Firmware / elecrow-crowpanel-basic-50 (push) Has been cancelled
Build Firmware / lilygo-tdeck (push) Has been cancelled
Build Firmware / lilygo-tlora-pager (push) Has been cancelled
Build Firmware / m5stack-cardputer (push) Has been cancelled
Build Firmware / m5stack-core2 (push) Has been cancelled
Build Firmware / m5stack-cores3 (push) Has been cancelled
Build Firmware / unphone (push) Has been cancelled
Build Firmware / waveshare-s3-touch-43 (push) Has been cancelled
Build Firmware / waveshare-s3-touch-lcd-147 (push) Has been cancelled
Build Firmware / waveshare-s3-touch-lcd-128 (push) Has been cancelled
Build Firmware / waveshare-s3-lcd-13 (push) Has been cancelled
Build SDK / esp32 (push) Has been cancelled
Build SDK / esp32s3 (push) Has been cancelled
Build Simulator / Build-Simulator-Linux (push) Has been cancelled
Build Simulator / Build-Simulator-macOS (push) Has been cancelled
Tests / Run (push) Has been cancelled
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define ESP_ELFSYM_EXPORT(_sym) { #_sym, (void*)&_sym }
|
|
#define ESP_ELFSYM_END { NULL, NULL }
|
|
|
|
/** @brief Function symbol description */
|
|
|
|
struct esp_elfsym {
|
|
const char *name; /*!< Function name */
|
|
const void *sym; /*!< Function pointer */
|
|
};
|
|
|
|
/**
|
|
* @brief Find symbol address by name.
|
|
*
|
|
* @param sym_name - Symbol name
|
|
*
|
|
* @return Symbol address if success or 0 if failed.
|
|
*/
|
|
uintptr_t elf_find_sym(const char *sym_name);
|
|
|
|
|
|
/**
|
|
* @brief Resolves a symbol name (e.g. function name) to its address.
|
|
*
|
|
* @param sym_name - Symbol name
|
|
* @return Symbol address if success or 0 if failed.
|
|
*/
|
|
typedef uintptr_t (*symbol_resolver)(const char *sym_name);
|
|
|
|
/**
|
|
* @brief Override the internal symbol resolver.
|
|
* The default resolver is based on static lists that are determined by KConfig.
|
|
* This override allows for an arbitrary implementation.
|
|
*
|
|
* @param resolver the resolver function
|
|
*/
|
|
void elf_set_symbol_resolver(symbol_resolver resolver);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|