cyclops <cyclops64@xxxxxxxxx> writes: > I just did what you said on our newlib-1.10.0, and I got the newlib > built succesfully (at least no error reported). > > Then, I tried to build a very simple small program, however, I got error as: > > /home/zeal/z64/local/bin/../lib/gcc/z6464-linux-elf/4.0.0/libgcc.a(__main.o): > In function `__do_global_dtors': > /home/zeal/z64/src/gcc-4.0.0/gcc/libgcc2.c:1951: undefined reference > to `__EH_FRAME_BEGIN__' > /home/zeal/z64/src/gcc-4.0.0/gcc/libgcc2.c:1951: undefined reference > to `__EH_FRAME_BEGIN__' > /home/zeal/z64/local/bin/../lib/gcc/z6464-linux-elf/4.0.0/libgcc.a(__main.o): > In function `__do_global_ctors': > /home/zeal/z64/src/gcc-4.0.0/gcc/libgcc2.c:1967: undefined reference > to `__EH_FRAME_BEGIN__' > /home/zeal/z64/src/gcc-4.0.0/gcc/libgcc2.c:1967: undefined reference > to `__EH_FRAME_BEGIN__' These are odd errors to get for an ELF target. I don't know what z6464 is. But you can only get those references in libgcc2.c for a target whose tm.h file does not define OBJECT_FORMAT_ELF or does not define either INIT_SECTION_ASM_OP or INIT_ARRAY_SECTION_ASM_OP. That should not be true for any ELF target. If you are using your own compiler port, you need to update your tm.h file, probably just by including elfos.h as most ELF targets do. If you are not using your own compiler port, what is z6464-linux-elf? Ian