frame_dummy and the 68000.

Chris Johns cjohns at cybertec.com.au
Tue Aug 8 02:07:59 UTC 2000


Hi,

Getting ELF C++ static constructors to run on a 68302 I am getting an
illegal instruction exception in frame_dummy (crtstuff.c in gcc
sources). I have marked the code which is not supported on the 68000. I
built the compiler but I see it is in the RPMs as well.

Is this a multilib bug in gcc ?

Does a patch exist ?

In :

$ pwd
/opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2
 
Looking in :

$ m68k-rtems-objdump -D crtbegin.o

crtbegin.o:     file format elf32-m68k

Disassembly of section .text:

00000000 <__do_global_dtors_aux>:
   0:   4e56 0000       linkw %fp,#0
   4:   2f0a            movel %a2,%sp at -
   6:   4ab9 0000 0000  tstl 0 <__do_global_dtors_aux>
   c:   6642            bnes 50 <__do_global_dtors_aux+0x50>
   e:   2079 0000 0000  moveal 0 <__do_global_dtors_aux>,%a0
  14:   45f9 0000 0000  lea 0 <__do_global_dtors_aux>,%a2
  1a:   4a90            tstl %a0@
  1c:   671e            beqs 3c <__do_global_dtors_aux+0x3c>
  1e:   2079 0000 0000  moveal 0 <__do_global_dtors_aux>,%a0
  24:   43e8 0004       lea %a0@(4),%a1
  28:   23c9 0000 0000  movel %a1,0 <__do_global_dtors_aux>
  2e:   2050            moveal %a0@,%a0
  30:   4e90            jsr %a0@
  32:   2079 0000 0000  moveal 0 <__do_global_dtors_aux>,%a0
  38:   4a90            tstl %a0@
  3a:   66e2            bnes 1e <__do_global_dtors_aux+0x1e>
  3c:   4a8a            tstl %a2
>>>>>>>>>>>             ^^^^^^^^ is not valid on a 68000

  3e:   6708            beqs 48 <__do_global_dtors_aux+0x48>
  40:   4879 0000 0000  pea 0 <__do_global_dtors_aux>
  46:   4e92            jsr %a2@
  48:   7001            moveq #1,%d0
  4a:   23c0 0000 0000  movel %d0,0 <__do_global_dtors_aux>
  50:   246e fffc       moveal %fp@(-4),%a2
  54:   4e5e            unlk %fp
  56:   4e75            rts

00000058 <fini_dummy>:
  58:   4e56 0000       linkw %fp,#0
  5c:   4e5e            unlk %fp
  5e:   4e75            rts

00000060 <frame_dummy>:
  60:   4e56 0000       linkw %fp,#0
  64:   41f9 0000 0000  lea 0 <__do_global_dtors_aux>,%a0
  6a:   4a88            tstl %a0
>>>>>>>>>>>             ^^^^^^^^ is not valid on a 68000

  6c:   670e            beqs 7c <frame_dummy+0x1c>
  6e:   4879 0000 0000  pea 0 <__do_global_dtors_aux>
  74:   4879 0000 0000  pea 0 <__do_global_dtors_aux>
  7a:   4e90            jsr %a0@
  7c:   4e5e            unlk %fp
  7e:   4e75            rts

00000080 <init_dummy>:
  80:   4e56 0000       linkw %fp,#0
  84:   4e5e            unlk %fp
  86:   4e75            rts
Disassembly of section .data:

00000000 <p.3>:
   0:   0000 0000       orib #0,%d0

00000004 <completed.4>:
   4:   0000 0000       orib #0,%d0
Disassembly of section .fini:

00000000 <.fini>:
   0:   4eb9 0000 0000  jsr 0 <.fini>
Disassembly of section .init:

00000000 <.init>:
   0:   4eb9 0000 0000  jsr 0 <.init>
Disassembly of section .ctors:

00000000 <__CTOR_LIST__>:
   0:   ffff            0177777
   2:   ffff            0177777
Disassembly of section .dtors:

00000000 <__DTOR_LIST__>:
   0:   ffff            0177777
   2:   ffff            0177777  

-- 
 Chris Johns, mailto:cjohns at cybertec.com.au mailto:ccj at acm.org



More information about the users mailing list