5353#endif
5454
5555/* Globals */
56- static uint8_t XALIGNED ( 4 ) digest [WOLFBOOT_SHA_DIGEST_SIZE ];
56+ static uint8_t digest [WOLFBOOT_SHA_DIGEST_SIZE ] XALIGNED ( 4 ) ;
5757
5858#if defined(WOLFBOOT_CERT_CHAIN_VERIFY ) && \
5959 defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT )
@@ -813,7 +813,7 @@ uint16_t wolfBoot_get_header(struct wolfBoot_image *img, uint16_t type,
813813}
814814
815815#ifdef EXT_FLASH
816- static uint8_t XALIGNED ( 4 ) ext_hash_block [WOLFBOOT_SHA_BLOCK_SIZE ];
816+ static uint8_t ext_hash_block [WOLFBOOT_SHA_BLOCK_SIZE ] XALIGNED ( 4 ) ;
817817#endif
818818/**
819819 * @brief Get a block of data to be hashed.
@@ -837,7 +837,7 @@ static uint8_t *get_sha_block(struct wolfBoot_image *img, uint32_t offset)
837837}
838838
839839#ifdef EXT_FLASH
840- static uint8_t XALIGNED ( 4 ) hdr_cpy [IMAGE_HEADER_SIZE ];
840+ static uint8_t hdr_cpy [IMAGE_HEADER_SIZE ] XALIGNED ( 4 ) ;
841841static int hdr_cpy_done = 0 ;
842842
843843/**
@@ -1565,7 +1565,7 @@ static int update_hash_flash_fwimg(wolfBoot_hash_t* ctx,
15651565{
15661566 uint32_t current_offset = offset ;
15671567 uint32_t remaining_size = size ;
1568- uint8_t XALIGNED ( 4 ) read_buf [WOLFBOOT_SHA_BLOCK_SIZE ]; /* Use local buffer */
1568+ uint8_t read_buf [WOLFBOOT_SHA_BLOCK_SIZE ] XALIGNED ( 4 ) ; /* Use local buffer*/
15691569
15701570 while (remaining_size > 0 ) {
15711571 uint32_t read_size = (remaining_size > WOLFBOOT_SHA_BLOCK_SIZE )
@@ -1594,7 +1594,7 @@ static int update_hash_flash_fwimg(wolfBoot_hash_t* ctx,
15941594static int update_hash_flash_addr (wolfBoot_hash_t * ctx , uintptr_t addr ,
15951595 uint32_t size , int src_ext )
15961596{
1597- uint8_t XALIGNED ( 4 ) buffer [WOLFBOOT_SHA_BLOCK_SIZE ];
1597+ uint8_t buffer [WOLFBOOT_SHA_BLOCK_SIZE ] XALIGNED ( 4 ) ;
15981598 uint32_t remaining_size = size ;
15991599 uintptr_t current_addr = addr ;
16001600
@@ -1633,7 +1633,7 @@ int wolfBoot_check_flash_image_elf(uint8_t part, unsigned long* entry_out)
16331633 size_t ph_size = 0 ;
16341634 size_t current_ph_offset = 0 ;
16351635 int64_t final_offset = -1 ;
1636- uint8_t XALIGNED ( 4 ) calc_digest [WOLFBOOT_SHA_DIGEST_SIZE ];
1636+ uint8_t calc_digest [WOLFBOOT_SHA_DIGEST_SIZE ] XALIGNED ( 4 ) ;
16371637 uint8_t * exp_digest ;
16381638 int32_t stored_sha_len ;
16391639 int i ;
0 commit comments