diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b5ce97a764..6b34124a063 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +1999-07-26 Andrew Haley + + * config/m32r/initfini.c (__init): Use a full word immediate for + __fini: this allows it to be placed in any memory region. + + * config/m32r/t-m32r: Compile crtinit.o and crtfini.o for + -mmodel=medium. This is OK for all memory models. + Mon Jul 26 11:58:46 1999 Nick Clifton * config/arm/arm.c: Replace %R%s in asm_fprintf strings with %r. diff --git a/gcc/config/m32r/initfini.c b/gcc/config/m32r/initfini.c index 51444279e52..4198e571c75 100644 --- a/gcc/config/m32r/initfini.c +++ b/gcc/config/m32r/initfini.c @@ -88,7 +88,8 @@ __init:\n\ push fp\n\ push lr\n\ mv fp,sp\n\ - ld24 r0,#__fini\n\ + seth r0, #shigh(__fini)\n\ + add3 r0, r0, #low(__fini)\n\ bl atexit\n\ .fillinsn\n\ "); diff --git a/gcc/config/m32r/t-m32r b/gcc/config/m32r/t-m32r index 3d8da58c116..4b8f417efa0 100644 --- a/gcc/config/m32r/t-m32r +++ b/gcc/config/m32r/t-m32r @@ -32,12 +32,12 @@ CRTSTUFF_T_CFLAGS = crtinit.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \ -DCRT_INIT -finhibit-size-directive -fno-inline-functions \ - -g0 -c $(srcdir)/config/m32r/initfini.c -o crtinit.o + -g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -o crtinit.o crtfini.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \ -DCRT_FINI -finhibit-size-directive -fno-inline-functions \ - -g0 -c $(srcdir)/config/m32r/initfini.c -o crtfini.o + -g0 -mmodel=medium -c $(srcdir)/config/m32r/initfini.c -o crtfini.o # -mmodel={small,medium} requires separate libraries.