diff --git a/boards/fxcg50/fxcg50.ld b/boards/fxcg50/fxcg50.ld index 6f941a3..0ca30b3 100644 --- a/boards/fxcg50/fxcg50.ld +++ b/boards/fxcg50/fxcg50.ld @@ -95,6 +95,8 @@ SECTIONS .got.plt : { *(.got.plt) *(.igot.plt) *(.igot) } .got : { *(.got) } + .dynamic : { *(.dynamic) } + /* readable / writable data */ .data ALIGN(4) : { diff --git a/boards/sdl2/board.toml b/boards/sdl2/board.toml index 51a58e0..5353bb6 100644 --- a/boards/sdl2/board.toml +++ b/boards/sdl2/board.toml @@ -14,6 +14,3 @@ modules = [ drivers = [ 'mpu:common:sdl2' ] -install_files = [ - 'sdl2.ld' -] diff --git a/kernel/src/modules/kmalloc/area_vhex.c b/kernel/src/modules/kmalloc/area_vhex.c index 4d3008b..bbc974f 100644 --- a/kernel/src/modules/kmalloc/area_vhex.c +++ b/kernel/src/modules/kmalloc/area_vhex.c @@ -240,7 +240,7 @@ static void *vhex_malloc(size_t size, void *data) int c = size_class(size); /* Try to find a class that has a free block available */ - block_t *alloc; + block_t *alloc = NULL; for(; c <= 15; c++) { block_t *list = index->classes[c]; diff --git a/vxsdk.toml b/vxsdk.toml index 7dc6da6..f210b47 100644 --- a/vxsdk.toml +++ b/vxsdk.toml @@ -27,6 +27,8 @@ assets_prefix = [ '-nostdlib', '-fPIE', '-O1', + '-mb', + '-m4-nofpu', '-fstrict-volatile-bitfields', '-Wa,--dsp' ] @@ -35,10 +37,14 @@ assets_prefix = [ '-Wl,--whole-archive', '-lvxkernel', '-Wl,--no-whole-archive', - '@sh-elf-vhex@' + '@sh-elf-vhex@', + '-lc', + '-lgcc' ] - VXSDK_PUBLIC_LINKER_SCRIPT = [ - 'fxcg50.ld' + VXSDK_PUBLIC_BUILD_LDFLAGS = [ + '-T {VXSDK_CURRENT_SOURCE_DIR}/boards/fxcg50/fxcg50.ld', + '-static-pie', + '-Wl,-q' ] [sdl2] @@ -56,6 +62,6 @@ assets_prefix = [ '-lSDL2', '-lm' ] - VXSDK_PUBLIC_LINKER_SCRIPT = [ - 'sdl2.ld' + VXSDK_PUBLIC_BUILD_LDFLAGS = [ + '-T {VXSDK_CURRENT_SOURCE_DIR}/boards/sdl2/sdl2.ld', ]