From 70ac990531162b904cdd6f375696a4faf7107279 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Wed, 13 Nov 2019 13:52:09 -0800 Subject: [PATCH] Detect "reloc truncated to fit" as medany incompatibility Signed-off-by: Nathaniel Graff --- scripts/detect-medany-incompatible | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/detect-medany-incompatible b/scripts/detect-medany-incompatible index d60f29296..5e58ee00c 100755 --- a/scripts/detect-medany-incompatible +++ b/scripts/detect-medany-incompatible @@ -13,4 +13,12 @@ if [ `echo $OUTPUT | grep -c "PCREL"` -ne 0 ] ; then >&2 echo " for the 'large' code model and cannot be supported with the" >&2 echo " current toolchain." exit 1 +elif [ `echo $OUTPUT | grep -c "relocation truncated to fit"` -ne 0 ] ; then + >&2 echo "ERROR: The linker is reporting that a relocation has been" + >&2 echo " truncated. This usually indicates that the memory layout" + >&2 echo " for the target is incompatible with the selected code model." + >&2 echo " Here, it probably means that this target requires support" + >&2 echo " for the 'large' code model and cannot be supported with the" + >&2 echo " current toolchain." + exit 1 fi