/*
* Copyright (c) 2006 SigmaTel, Inc.
*
* elftosb boot description file that creates some complicated situations for
* the loader to handle. of course this is also a good test for elftosb itself.
*/
/* testing C style comments */
// testing C++ style comments
# testing shell style comments
info "welcome to section 1!";
info "elffile path = $(elffile)";
info "mainSizeIsDefined = $(d:mainSizeIsDefined)";
info "printMessage = $(x:printMessageAddr)";
info "size of binfile1 = $(binfile1size)";
// can use symbol refs inside bool expressions in an if stmt
if elffile:main == 0
{
warning "$(elffile) does not seem to have a main() function";
}
else
{
info "address of main() of $(elffile) is $(x:mainAddr)";
}
if defined(flag) && flag != 0
{
load 0x1234.h > 0..10K;
}
else
{
// print message using both decimal and hex formatting
warning "loading only halfword = $(d:halfword) [$(x:halfword)]!";
load halfword > 0..1K;
}
info "size of main() in $(elffile) is $(mainSize)";
info "printMessage() size is $(printMessageSize)";
info "size of halfword = $(halfwordSize)";
/*
* create a data section out of some sections of an elf file
*/
section (1234) <= ~$.bss, ~$.data from elffile;
section (4321) <= elffile [ $* ];
section (1111) <= elffile;
/* test data sections from various data sources */
section (0xaa) <= 0x12345678.w;
section (0xbb) <= "hi there! this is a data section.";
section (0xcc) <= {{ aa55aa55aa55aa55aa55aa55aa55aa55 }};