-
Notifications
You must be signed in to change notification settings - Fork 9
/
t_aoutnull.c
91 lines (82 loc) · 1.82 KB
/
t_aoutnull.c
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* $VER: vlink t_aoutnull.c V0.13 (02.11.10)
*
* This file is part of vlink, a portable linker for multiple
* object formats.
* Copyright (c) 1997-2010 Frank Wille
*/
#include "config.h"
#if defined(AOUT_NULL)
#define T_AOUTNULL_C
#include "vlink.h"
#include "aout.h"
static const char null_exe[] = {
"SECTIONS\n"
"{\n"
" . = 0x1020;\n"
" .text :\n"
" {\n"
" *(.i* i* I*)\n"
" *(.t* t* T* .c* c* C*)\n"
" *(.f* f* F*)\n"
" _etext = .;\n"
" __etext = .;\n"
" . = ALIGN(4);\n"
" }\n"
" .data: {\n"
" PROVIDE(_LinkerDB = . + 0x8000);\n"
" PROVIDE(_SDA_BASE_ = . + 0x8000);\n"
" VBCC_CONSTRUCTORS\n"
" *(.rodata*)\n"
" *(.d* d* D*)\n"
" *(.sdata*)\n"
" *(__MERGED)\n"
" _edata = .;\n"
" __edata = .;\n"
" . = ALIGN(4);\n"
" }\n"
" .bss: {\n"
" *(.sbss*)\n"
" *(.scommon)\n"
" *(.b* b* B* .u* u* U*)\n"
" *(COMMON)\n"
" _end = ALIGN(4);\n"
" __end = ALIGN(4);\n"
" }\n"
"}\n"
};
static int aoutnull_identify(struct GlobalVars *,char *,uint8_t *,
unsigned long,bool);
struct FFFuncs fff_aoutnull = {
"aoutnull",
null_exe,
NULL,
NULL,
NULL,
aout_headersize,
aoutnull_identify,
aoutstd_readconv,
NULL,
aout_targetlink,
NULL,
aout_lnksym,
aout_setlnksym,
NULL,NULL,NULL,
aoutstd_writeobject,
aoutstd_writeshared,
aoutstd_writeexec,
bss_name,NULL,
0x1000,
0x8000, /* @@@ ? */
0,
0,
RTAB_STANDARD,RTAB_STANDARD,
-1, /* endianness unknown */
32,0, /* @@@ standard a.out is always based on 32 bit addresses */
FFF_BASEINCR
};
static int aoutnull_identify(struct GlobalVars *gv,char *name,uint8_t *p,
unsigned long plen,bool lib)
{
return aout_identify(&fff_aoutnull,name,(struct aout_hdr *)p,plen);
}
#endif