Detabbed
[AROS.git] / rom / dos / include / loadseg.h
blobc261e319c2047bc7fccfa5b7dd38d91bd967a11d
1 /*
2 * Copyright (C) 2011, The AROS Development Team. All rights reserved.
3 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
5 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
6 */
8 #ifndef LOADSEG_LOADSEG_H
9 #define LOADSEG_LOADSEG_H
11 #include <aros/libcall.h>
12 #include <dos/elf.h>
14 /* This is called after ELF file is loaded. You may grab the debug info from it. */
15 void register_elf(BPTR file, BPTR hunks, struct elfheader *eh, struct sheader *sh, struct DosLibrary *DOSBase);
17 AROS_LD4(BPTR, InternalLoadSeg,
18 AROS_LDA(BPTR , fh , D0),
19 AROS_LDA(BPTR , table , A0),
20 AROS_LDA(LONG_FUNC *, funcarray , A1),
21 AROS_LDA(LONG * , stack , A2),
22 struct DosLibrary *, DOSBase, 126, Dos);
24 /*
25 * Use LoadSegment() to call the linklib's loader.
26 * There's no counterpart since the loaded seglist can be freed by
27 * conventional IntrernalUnloadSeg(), even on old AmigaOS.
29 #define LoadSegment(fh, table, funcarray, stack) \
30 AROS_CALL4(BPTR, AROS_SLIB_ENTRY(InternalLoadSeg, Dos, 126), \
31 AROS_LCA(BPTR , fh , D0), \
32 AROS_LDA(BPTR , table , A0), \
33 AROS_LDA(LONG_FUNC *, funcarray , A1), \
34 AROS_LDA(LONG * , stack , A2), \
35 struct DosLibrary *, DOSBase)
37 #endif /* LOADSEG_LOADSEG_H */