[Buildroot] Illegal instruction when running some of the cross compiled binaries
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Tue Jan 11 13:45:03 UTC 2011
Hello Divick,
On Tue, 11 Jan 2011 17:55:15 +0530
Divick Kishore <divick.kishore at gmail.com> wrote:
> I have built a custom root filesystem using build root, but
> certain binaries (built with the packages selected during menuconfig)
> when run give "Illegal Instruction".
>
> # sshd
> Illegal instruction
>
> Having looked at the logs, the compiler flags used to build the binary
> seems fine (-mtune=arm920t -march=armv4t -mabi=aapcs-linux
> -msoft-float ) i.e. right for my H/W (ATMEL AT91RM9200).
During compilation yes, but at the link stage of sshd, the
-march=armv4t flag is missing. Therefore, some ARMv5-only code gets
added to the binary. Maybe we need to add -march=armv4t to the
TARGET_LDFLAGS, or some other trick. I haven't tested anything for the
moment, so feel free to experiment.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the buildroot
mailing list