diff options
Diffstat (limited to 'tboot/genlds.sh')
-rwxr-xr-x | tboot/genlds.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tboot/genlds.sh b/tboot/genlds.sh new file mode 100755 index 0000000..3d2806f --- /dev/null +++ b/tboot/genlds.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +RO_DATA_SECTION=".rdata" + +if [ "$1" == "gcc" ]; then + RO_DATA_SECTION=".rodata" +fi + +cat << EOF >> tboot.lds +SECTIONS +{ + .text : { + . = ALIGN(4096); + *(.text) + *($RO_DATA_SECTION) + *(SORT($RO_DATA_SECTION*)) + } +} +EOF |