linker: add whole-archive flag to app lib

Change-Id: I167b67bb227718d18bc383c4562cccaa915ed22b
Signed-off-by: Alexandre d'Alton <alexandre.d'alton@intel.com>
Signed-off-by: Alexandre d'Alton <alexandre.dalton@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Alexandre dAlton 2015-08-19 13:32:21 +02:00 committed by Anas Nashif
commit 3bef343493
2 changed files with 9 additions and 0 deletions

View file

@ -43,6 +43,9 @@ linker_params()
echo "-L ${objtree}/include/generated" >> ${1}
echo "-u _OffsetAbsSyms -u _ConfigAbsSyms" >> ${1}
echo "-e __start" >> ${1}
if [ -n "${CONFIG_LINK_WHOLE_ARCHIVE}" -a -n "${KBUILD_ZEPHYR_APP}" ]; then
echo "--whole-archive ${KBUILD_ZEPHYR_APP} --no-whole-archive" >> ${1}
fi
echo "--start-group ${KBUILD_ZEPHYR_MAIN} ${KBUILD_ZEPHYR_APP}" >> ${1}
echo "${objtree}/arch/${SRCARCH}/core/offsets/offsets.o" >> ${1}
echo "--end-group" >> ${1}