tests: misc: iterable_sections: add const specifier for ROM data

Without the const specifier the data is stored in RAM instead of ROM.

Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
Martin Jäger 2022-10-11 17:58:03 +02:00 committed by Carles Cufí
commit 9973dc59cf

View file

@ -51,10 +51,10 @@ struct test_rom {
}; };
/* declare in random order to check that the linker is sorting by name */ /* declare in random order to check that the linker is sorting by name */
STRUCT_SECTION_ITERABLE(test_rom, rom1) = {0x10}; const STRUCT_SECTION_ITERABLE(test_rom, rom1) = {0x10};
STRUCT_SECTION_ITERABLE(test_rom, rom3) = {0x30}; const STRUCT_SECTION_ITERABLE(test_rom, rom3) = {0x30};
STRUCT_SECTION_ITERABLE(test_rom, rom4) = {0x40}; const STRUCT_SECTION_ITERABLE(test_rom, rom4) = {0x40};
STRUCT_SECTION_ITERABLE(test_rom, rom2) = {0x20}; const STRUCT_SECTION_ITERABLE(test_rom, rom2) = {0x20};
#define ROM_EXPECT 0x10203040 #define ROM_EXPECT 0x10203040