Prior to this fix the descriptors end tag was placed in the binary using LONG. This was wrong because the tag is of type short, and the size of the descriptor (0), should have also been placed. It so happened that on little endian machines the incorrect linker script yielded correct results, as the extra zeros added to make the value a long ended up as the correct byte sequence (FF FF 00 00). On big endian machines however, the wrong sequence is generated (00 00 FF FF). This patch correct this issue. Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
14 lines
294 B
Text
14 lines
294 B
Text
/*
|
|
* Copyright (c) 2023 Yonatan Schachter
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/linker/iterable_sections.h>
|
|
#include <zephyr/bindesc.h>
|
|
|
|
SQUAD(BINDESC_MAGIC);
|
|
Z_LINK_ITERABLE(bindesc_entry);
|
|
. = ALIGN(BINDESC_ALIGNMENT);
|
|
SHORT(BINDESC_TAG_DESCRIPTORS_END);
|
|
SHORT(0);
|