summaryrefslogtreecommitdiff
path: root/fpcsrc/rtl/linux/m68k/dllprt0.as
blob: a7e14d1fdbc831cc66aaf084f5cd4dee64f1f765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
|   $Id: dllprt0.as,v 1.1.2.4 2001/08/01 13:26:17 pierre Exp $
|   This file is part of the Free Pascal run time library.
|   Copyright (c) 2001 by Pierre Muller
|
|   See the file COPYING.FPC, included in this distribution,
|   for details about the copyright.
|
|   This program is distributed in the hope that it will be useful,
|   but WITHOUT ANY WARRANTY;without even the implied warranty of
|   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|**********************************************************************}
|
| Linux m68k ELF shared library startup code for Free Pascal
|
        .file "dllprt0.as"
	.text
        .globl  _startlib
        .type   _startlib,@function
_startlib:
        .globl  FPC_SHARED_LIB_START
        .type   FPC_SHARED_LIB_START,@function
FPC_SHARED_LIB_START:
|
|       The args and envs are not tested yet
|
        move.l   (%sp)+, %d0
        lea      4(%sp,%d0*4),%a0
        move.l   %a0, U_SYSLINUX_ENVP
        move.l   %sp,U_SYSLINUX_ARGV
        move.l   %d0,U_SYSLINUX_ARGC
        jsr      PASCALMAIN
        rts

        .globl  _haltproc
        .type   _haltproc,@function
haltproc:
        .globl  FPC_SHARED_LIB_EXIT
        .type   FPC_SHARED_LIB_EXIT,@function
FPC_SHARED_LIB_EXIT:
        moveq.l   #1,%d0
        move.w    U_SYSLINUX_EXITCODE,%d1
        trap      #0
        bra       _haltproc


        .data
	.align  4
	.globl  ___fpc_brk_addr
___fpc_brk_addr:
        .long   0

|
| $Log: dllprt0.as,v $
| Revision 1.1.2.4  2001/08/01 13:26:17  pierre
|  * syntax adapted to GNU as
|
| Revision 1.1.2.3  2001/07/13 15:13:47  pierre
|  + add and fix some comments
|
| Revision 1.1.2.2  2001/07/13 15:04:35  pierre
|  * correct assembler error
|
| Revision 1.1.2.1  2001/07/13 15:03:02  pierre
|  + New file converted from i386 version
|
|