How to build image with debug symbols enabled?

Hi Team,

I would like to generate a single image with debug symbols enabled. I could notice that, build directory binaries are having debug symbols. But after "package/install" in the compilation process, stripped application goes to rootfs. I would like to avoid this with a compilation flag. Is there a way already ?

In the rootfs, It shows below for the "file" command for all the files.

ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/, corrupted section header size

Thanks in advance.

You need to set proper build options in the menuconfig / build config to avoid stripping.

Global build settings / Stripping options