From 1528700d31abec6e74f1c18ce9c247fcf9010214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 6 Jan 2023 16:17:55 +0100 Subject: [PATCH] Add reading of LMA --- src/elfpatch.c | 4 ++-- src/xml.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/elfpatch.c b/src/elfpatch.c index d98823e..709918b 100644 --- a/src/elfpatch.c +++ b/src/elfpatch.c @@ -708,9 +708,9 @@ int elf_patch_write_crcs_to_section(elfpatch_handle_t *ep, const char *section, needed_space = calculate_needed_space_for_crcs(ep, format, check_start_magic, check_end_magic, crc_size_bytes, crc_count); - print_debug("Required space for %zu CRCs %s: %zu (available: %zu)\n", + print_debug("Required space for %zu CRCs%s: %zu (available: %zu)\n", crc_count, - (check_start_magic || check_end_magic ? "including magic values" : ""), + (check_start_magic || check_end_magic ? " including magic values" : ""), needed_space, output_sec_data->d_size ); diff --git a/src/xml.c b/src/xml.c index 4ed7af6..a68e4bd 100644 --- a/src/xml.c +++ b/src/xml.c @@ -405,9 +405,8 @@ struct xml_crc_import *xml_import_from_file(const char *path) ret->xml_crc_entries = sl_list_append(ret->xml_crc_entries, crc); get_uint64_from_node_attribute(current_node, "vma", &tmp_num64); - printf("vma: %x\n", (uint32_t)tmp_num64); get_uint64_from_node_attribute(current_node, "size", &tmp_num64); - printf("size: %x\n", (uint32_t)tmp_num64); + get_uint64_from_node_attribute(current_node, "lma", &tmp_num64); }