You guys have been really helpful. Thanks a lot! I'm reusing someone elses code so I am fumbling in the dark a bit. I have a few questions about the ctors/dtors section. I've defined these in my linker script: __ctors = .; .ctors : { *(.ctors) } __dtors = .; .dtors : { *(.dtors) } When I disassemble my binary, I don't see these labels. Could this be because the linker cannot find any .ctors/.dtors sections? I do have constructors/destructors defined for my C++ classes. I've defined a custom "_start" section in assembly. The existing code seems to get the first address out of the ctors section and jumps to it. I guess the ctors section contains pointers to the constructor functions? Since the binary doesn't contain a ctors/dtors section, the execution jumps to the wrong address. Could you point me to some documentation on the ctors and dtors areas? I couldn't find any good info online. thanks JJ On Mon, Oct 26, 2009 at 2:44 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > JJ <alchemistmba@xxxxxxxxx> writes: > >> I'm left with the assertion failures: >> $ /tools/.../arm-none-linux-gnueabi-g++ -static -nostartfiles -T >> temp.ld -o output_program start.o abc.o xyz.o >> /tools/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: >> BFD (Sourcery G++ Lite 2008q3-41) 2.18.50.20080215 as >> sertion fail /scratch/../linux/obj/binutils-src-2008q3-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf.c:3916 >> /tools/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: >> BFD (Sourcery G++ Lite 2008q3-41) 2.18.50.20080215 as >> sertion fail /scratch/../linux/obj/binutils-src-2008q3-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf.c:3916 > > > We can't help you with those. They are in the linker, not the > compiler. Ask on the GNU binutils binutils@xxxxxxxxxxxxxx; see > http://sourceware.org/binutils/ . > > I note that you seem to be using a toolchain from CodeSourcery, and > they provide support for their tools. > > Ian >