mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 01:33:13 +01:00
Fixed few issues with loader and basic image loading.
Declaring section of the form: .align 4 .section "kernel" .incbin "path-to-kernel" And defining a linker variable before the section output does not always seem to work. The linker seems to add padding even though .align directive comes before .section modified: SConstruct.loader modified: loader/linker.lds modified: loader/main.c
This commit is contained in:
@@ -33,7 +33,8 @@ env = Environment(CC = 'arm-none-eabi-gcc',
|
||||
ASFLAGS = ['-D__ASSEMBLY__'],
|
||||
PROGSUFFIX = '.elf',
|
||||
ENV = {'PATH' : os.environ['PATH']},
|
||||
LIBS = ['gcc'],
|
||||
LIBS = ['gcc', 'elf', 'c-baremetal', 'gcc'],
|
||||
LIBPATH = [join('build', LIBELF_PATH), join('build', LIBC_PATH)],
|
||||
CPPPATH = ['#include', LIBC_INCPATH, LIBELF_INCPATH])
|
||||
|
||||
libc = SConscript('loader/libs/c/SConscript', \
|
||||
@@ -45,4 +46,6 @@ libelf = SConscript('loader/libs/elf/SConscript', exports = { 'env' : env }, \
|
||||
loader_objs = SConscript('loader/SConscript', exports = { 'env' : env }, \
|
||||
duplicate = 0, variant_dir = 'build/loader')
|
||||
|
||||
env.Program('build/final.elf', [loader_objs + libc + libelf])
|
||||
env.Program('build/final.elf', [libelf + libc + loader_objs])
|
||||
Depends(loader_objs, libelf)
|
||||
Depends(loader_objs, libc)
|
||||
|
||||
Reference in New Issue
Block a user