* @brief Print section header description information of ELF. * * @param pbuf - ELF data buffer * * @return None */
| 636 | * @return None |
| 637 | */ |
| 638 | void esp_elf_print_shdr(const uint8_t *pbuf) |
| 639 | { |
| 640 | const elf32_hdr_t *ehdr = (const elf32_hdr_t *)pbuf; |
| 641 | const elf32_shdr_t *shdr = (const elf32_shdr_t *)((size_t)pbuf + ehdr->shoff); |
| 642 | |
| 643 | for (int i = 0; i < ehdr->shnum; i++) { |
| 644 | ESP_LOGI(TAG, "%-40s %d", "name:", shdr->name); |
| 645 | ESP_LOGI(TAG, "%-40s %d", "type:", shdr->type); |
| 646 | ESP_LOGI(TAG, "%-40s 0x%x", "flags:", shdr->flags); |
| 647 | ESP_LOGI(TAG, "%-40s %x", "addr", shdr->addr); |
| 648 | ESP_LOGI(TAG, "%-40s %x", "offset:", shdr->offset); |
| 649 | ESP_LOGI(TAG, "%-40s %d", "size", shdr->size); |
| 650 | ESP_LOGI(TAG, "%-40s 0x%x", "link", shdr->link); |
| 651 | ESP_LOGI(TAG, "%-40s %d", "addralign", shdr->addralign); |
| 652 | ESP_LOGI(TAG, "%-40s %d", "entsize", shdr->entsize); |
| 653 | |
| 654 | shdr = (const elf32_shdr_t *)((size_t)shdr + sizeof(elf32_shdr_t)); |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | /** |
| 659 | * @brief Print section information of ELF. |
nothing calls this directly
no outgoing calls
no test coverage detected