diff options
Diffstat (limited to 'gcc/config/mmix/crti.asm')
-rw-r--r-- | gcc/config/mmix/crti.asm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/mmix/crti.asm b/gcc/config/mmix/crti.asm index d118cb8d028..f4458f7b1b8 100644 --- a/gcc/config/mmix/crti.asm +++ b/gcc/config/mmix/crti.asm @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson <hp@bitrange.com> This file is free software; you can redistribute it and/or modify it @@ -103,6 +103,14 @@ _init: TRAP 0,0,0 0H IS @ +% Register _fini to be executed as the last atexit function. +#ifdef __MMIX_ABI_GNU__ + GETA $231,_fini +#else + GETA $1,_fini +#endif + PUSHJ $0,atexit + .section .fini,"ax",@progbits .global _fini _fini: |