target/image: fix - p_flags field in ELF64 segment headers is 64 bits wide

Fixed the reading of p_flags in ELF64 segment headers - that field
is 64 bits wide.

Change-Id: I053ca57d36efb54b7c638484acd6c7a2fbcbd05a
Signed-off-by: Jan Matyas <matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6927
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Jan Matyas
2022-04-12 13:33:51 +02:00
committed by Antonio Borneo
parent 5ebb1bdea1
commit a213397323
2 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ enum image_type {
struct imagesection {
target_addr_t base_address;
uint32_t size;
int flags;
uint64_t flags;
void *private; /* private data */
};
@@ -108,7 +108,7 @@ int image_read_section(struct image *image, int section, target_addr_t offset,
void image_close(struct image *image);
int image_add_section(struct image *image, target_addr_t base, uint32_t size,
int flags, uint8_t const *data);
uint64_t flags, uint8_t const *data);
int image_calculate_checksum(const uint8_t *buffer, uint32_t nbytes,
uint32_t *checksum);