This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Segfaults for minor code changes, Alignment issue?

I am using DS-5 w/gcc on a win7x64 to compile c++ code for Terasic's SoCKit, so x64 to arm.
I have code that runs fine.  The first line is a cout of a string.  It then goes on to have other exciting lines.

I add a class into the project (by dropping the source into the project folder), but never reference it, never include a header.

It compiles fine, I move it to the SoCKit and it segfaults immediately.

This "smells" like an alignment issue. I move a line of code and segfault. I put it back it works.  I add a cout and sometimes it segfaults good code, and sometimes it fixes segfault code.

Everything I've googled hasn't produced any result.  I'm willing to add more information, but the code is proprietary.

I've tried gbd, it doesn't like the ELF files ds-5/gcc is generating and produces this response:

GNU gdb (Linaro GDB) 7.8-2014.09
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-angstrom-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.linaro.org>.
Find the GDB manual and other documentation resources online at:
<www.gnu.org/.../>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
"/home/dev/RebionHPS": not in executable format: File format not recognized
(gdb) q