PRU: Add alignment for resource table, and allow sizes of memory regions to be set from the command line.
ld * scripttempl/pru.sc (.resource_table): Add ALIGN directive. Use symbols for memory sizes.
This commit is contained in:
parent
e4b1ab2062
commit
261980de18
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2021-05-10 Dimitar Dimitrov <dimitar@dinux.eu>
|
||||||
|
|
||||||
|
* scripttempl/pru.sc (.resource_table): Add ALIGN directive.
|
||||||
|
Use symbols for memory sizes.
|
||||||
|
|
||||||
2021-05-08 Mike Frysinger <vapier@gentoo.org>
|
2021-05-08 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* Makefile.am (html-local, doc/ld/index.html): New targets.
|
* Makefile.am (html-local, doc/ld/index.html): New targets.
|
||||||
|
|
|
@ -5,10 +5,14 @@ OUTPUT_ARCH(${ARCH})
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test -n "${RELOCATING}" && cat <<EOF
|
test -n "${RELOCATING}" && cat <<EOF
|
||||||
|
/* Allow memory sizes to be overridden from command line. */
|
||||||
|
__IMEM_SIZE = DEFINED(__IMEM_SIZE) ? __IMEM_SIZE : $TEXT_LENGTH;
|
||||||
|
__DMEM_SIZE = DEFINED(__DMEM_SIZE) ? __DMEM_SIZE : $DATA_LENGTH;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
imem (x) : ORIGIN = $TEXT_ORIGIN, LENGTH = $TEXT_LENGTH
|
imem (x) : ORIGIN = $TEXT_ORIGIN, LENGTH = __IMEM_SIZE
|
||||||
dmem (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
|
dmem (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = __DMEM_SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
__HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : 32;
|
__HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : 32;
|
||||||
|
@ -149,6 +153,9 @@ SECTIONS
|
||||||
|
|
||||||
.resource_table ${RELOCATING-0} :
|
.resource_table ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
|
/* Linux remoteproc loader requires the resource table address
|
||||||
|
to be aligned to 8 bytes. */
|
||||||
|
${RELOCATING+. = ALIGN(8);}
|
||||||
KEEP (*(.resource_table))
|
KEEP (*(.resource_table))
|
||||||
} ${RELOCATING+ > dmem}
|
} ${RELOCATING+ > dmem}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue