Commit Graph

2 Commits

Author SHA1 Message Date
Watson Zeng 214d91c19d toolchain: arcmwdt: linker: fix placeholders for arcmwdt toolchain
syntax ". += length;" not work with arcmwdt toolchain, let's using
". = . + length;", which both work with gnu and arcmwdt toolchain.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-05-20 07:50:38 -05:00
Daniel Leung 1117169980 kernel: generate placeholders for kobj tables before final build
Due to the use of gperf to generate hash table for kobjects,
the addresses of these kobjects cannot change during the last
few phases of linking (especially between zephyr_prebuilt.elf
and zephyr.elf). Because of this, the gperf generated data
needs to be placed at the end of memory to avoid pushing symbols
around in memory. This prevents moving these generated blocks
to earlier sections, for example, pinned data section needed
for demand paging. So create placeholders for use in
intermediate linking to reserve space for these generated blocks.
Due to uncertainty on the size of these blocks, more space is
being reserved which could result in wasted space. Though, this
retains the use of hash table for faster lookup.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-27 13:32:00 -04:00