mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
tool/run: define core link address explicitly
Instead of implicitly asking for core's link address when linking core within the run tool, deliver it explicitly to the build_core routine. Thereby we gain the freedom to use the build_core tool for different targets like core, and bootstrap. Ref #2092
This commit is contained in:
parent
d549921bc8
commit
bb10afa266
@ -737,7 +737,7 @@ proc generate_boot_modules_asm {path modules} {
|
|||||||
##
|
##
|
||||||
# Link core image containing given modules
|
# Link core image containing given modules
|
||||||
#
|
#
|
||||||
proc build_core {lib modules target} {
|
proc build_core {lib modules target link_address} {
|
||||||
|
|
||||||
# generate assembly code aggregating the modules data
|
# generate assembly code aggregating the modules data
|
||||||
set asm_src [generate_boot_modules_asm [run_dir]/genode $modules]
|
set asm_src [generate_boot_modules_asm [run_dir]/genode $modules]
|
||||||
@ -756,7 +756,7 @@ proc build_core {lib modules target} {
|
|||||||
# link final image
|
# link final image
|
||||||
exec [cross_dev_prefix]g++ {*}$arch -nostdlib {*}[core_ld_opts] \
|
exec [cross_dev_prefix]g++ {*}$arch -nostdlib {*}[core_ld_opts] \
|
||||||
-Wl,-z -Wl,max-page-size=0x1000 \
|
-Wl,-z -Wl,max-page-size=0x1000 \
|
||||||
-Wl,-Ttext=[core_link_address] -Wl,-gc-sections \
|
-Wl,-Ttext=$link_address -Wl,-gc-sections \
|
||||||
-Wl,-nostdlib -Wl,--whole-archive -Wl,--start-group \
|
-Wl,-nostdlib -Wl,--whole-archive -Wl,--start-group \
|
||||||
$lib [run_dir].boot_modules.o -Wl,--no-whole-archive \
|
$lib [run_dir].boot_modules.o -Wl,--no-whole-archive \
|
||||||
-Wl,--end-group $libgcc -o $target
|
-Wl,--end-group $libgcc -o $target
|
||||||
@ -779,10 +779,10 @@ proc build_core_image {binaries} {
|
|||||||
set core_obj core/[kernel_specific_binary core.o]
|
set core_obj core/[kernel_specific_binary core.o]
|
||||||
|
|
||||||
# create core binary without modules for debugging
|
# create core binary without modules for debugging
|
||||||
build_core $core_obj {} [run_dir].core
|
build_core $core_obj {} [run_dir].core [core_link_address]
|
||||||
|
|
||||||
# create core binary containing the boot modules
|
# create core binary containing the boot modules
|
||||||
build_core $core_obj $modules [run_dir]/image.elf
|
build_core $core_obj $modules [run_dir]/image.elf [core_link_address]
|
||||||
exec [cross_dev_prefix]strip [run_dir]/image.elf
|
exec [cross_dev_prefix]strip [run_dir]/image.elf
|
||||||
|
|
||||||
# remove individual binaries, which are now contained in 'image.elf'
|
# remove individual binaries, which are now contained in 'image.elf'
|
||||||
|
Loading…
Reference in New Issue
Block a user