This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problems with m68k egcs-1.1.1 & newlib-1.8.1


Hi,

I have been experiencing some problems in attempting to move some
existing embedded 68k 'C' code (built originally using gcc-2.7.2 and
newlib-1.6.1) to egcs-1.1.1 and newlib-1.8.1. If I can get things to
work, the intention is to add some new code written in C++. So far, this
has proved frustratingly difficult.

Some of the problems may simply be a lack of understanding on my part.
I posted a message to gnu.gcc.help but as yet have received no replies.
I would be grateful for any help.


1) I am getting frequent run-time stack overflows. The system runs under
the VRTX RTOS where each task is allocated a separate stack. The ISRs
all use a separate single stack. At first I thought this was down to
increased stack usage by newlib-1.8.1. I have tried increasing the stack
size for a number of tasks but each time the overflow moves to a
different task. I have not yet managed to track this problem down,
although I am suspicious of newlib-1.8.1 - is there a memory leak
problem ?. This did not happen when using gcc-2.7.2 and newlib-1.6.1.

2) newlib-1.8.1 no longer supports the MALLOC_PROVIDED compile option.
Since we have our own malloc(), calloc() etc. this gives duplicate
function name errors at link time. I have had to modify mallocr.c within
the library to re-introduce the compile switch. Is there a better
solution ?

3) Under egcs-1.1.1, some in-line assembler contained within a 'C'
source file is being located at odd addresses giving run-time address
exceptions. I've had to add some asm(".align 2"); lines to the source. I
don't understand why I should have to do this. Surely the
compiler/linker should be aware that m68k code must start on even
addresses.

4) When I tried adding some C++ code, I get unresolved references to
copy_reg, get_reg & put_reg. This looks like it's because the compile
switch DWARF2_UNWIND_INFO is not defined in gcc/libgcc2.c. Do I need to
rebuild egcs with this switch defined ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]