diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 08b6d3d6..80509d0d 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -461,6 +461,12 @@ do_rootfs_finalize() {
         fi
 EOSUDO
 
+    # Move core dump files generated in rootfs to temp folder in workdir.
+    for f in ${ROOTFSDIR}/*.core; do
+        sudo mv "${f}" "${WORKDIR}/temp/"
+        bbwarn "found core dump in rootfs, moved it to ${WORKDIR}/temp/"
+    done
+
     # Set same time-stamps to the newly generated file/folders in the
     # rootfs image for the purpose of reproducible builds.
     if [ -n "${SOURCE_DATE_EPOCH}" ]; then
