From 6dc68c1776e094f7541b9118b5ea613ec325da24 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Sat, 26 Sep 2009 22:12:11 +0300 Subject: [PATCH] Force rebuild of bare containers when their linker script changes. Small change but useful since linker address configuration changes should force relinking of container executables. --- conts/test/SConstruct | 1 + conts/test/include/linker.lds | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/conts/test/SConstruct b/conts/test/SConstruct index 6d80cb5..23e059c 100644 --- a/conts/test/SConstruct +++ b/conts/test/SConstruct @@ -52,3 +52,4 @@ src += Glob('src/*.[cS]') objs = env.Object(src) prog = env.Program('main.elf', objs) +Depends(prog, 'include/linker.lds') diff --git a/conts/test/include/linker.lds b/conts/test/include/linker.lds index bc09a22..abb38b5 100644 --- a/conts/test/include/linker.lds +++ b/conts/test/include/linker.lds @@ -13,7 +13,15 @@ ENTRY(_start) SECTIONS { . = vma_start; - .text : AT (ADDR(.text) - offset) { *(.text.head) *(.text) } + .text : AT (ADDR(.text) - offset) { + /* + * NOTE: + * crt0.S must be in .text.head. This is necessary because + * the kernel does not know any _start address, it assumes + * the start address of pager region as the start address. + */ + *(.text.head) *(.text) + } .rodata : AT (ADDR(.rodata) - offset) { *(.rodata) } .rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) }