Differences From Artifact [4fdf362ff0]:
- Executable file
freshlib/macros/Linux/_import.inc
— part of check-in
[c95846ab5c]
at
2011-04-06 11:18:30
on branch FreshLibDev
— Added unified title comments block to every file in the source tree. The title comments block contains only
information about file purpose, possible dependencies and target OS.
I intentionally removed from title comments all information about people, changes, reference and dates, because this kind of information is imposible to be maintained up to date. This makes it useless or even misleading.
Information about license and development team is added in readme.txt and license.txt files. (user: lhmnai0 size: 3405) [more...]
To Artifact [874573fd5d]:
- Executable file freshlib/macros/Linux/_import.inc — part of check-in [92da63bd10] at 2012-02-09 15:03:54 on branch FreshLibDev — Some bug fixes. Mainly in StrLib. Many more remains. Linux import macros fixed to use argument names. Some small work on TScrollWindow design. (user: lhmnai0 size: 3405) [more...]
| ︙ | ︙ | |||
36 37 38 39 40 41 42 |
define name#@arg arg
}
define needed@dynamic
define imported@dynamic
| | | | | 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 |
define name#@arg arg
}
define needed@dynamic
define imported@dynamic
macro __define_import_arguments_var [argument] {
common
virtual at ebp+8
forward
argument dd ?
common
end virtual
}
macro __define_import_arguments name {
common
if name#@arg eq VOID
.__info.argtype=1
else
if name#@arg eq NONE
.__info.argtype = 0
else
match A, name#@arg \{ __define_import_arguments_var A \}
.__info.argtype = 2
end if
end if
}
|
| ︙ | ︙ | |||
106 107 108 109 110 111 112 |
if used name
local fstr
Elf32_Sym fstr-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0
cnt = cnt + 1
end if
\}
| < < < < < < > | < | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
if used name
local fstr
Elf32_Sym fstr-strtab,0,0,STB_GLOBAL,STT_FUNC,0,0
cnt = cnt + 1
end if
\}
common
rel:
local counter
counter = 1
forward
match cnt:name, cntandname \{
if used name
Elf32_Rel name, counter, R_386_32
counter = counter + 1
end if
\}
common
relsz = $-rel
hash:
dd 1, counter
dd 0
repeat counter
if %=counter
dd 0
else
dd %
end if
end repeat
strtab db 0
forward
match cnt:name, cntandname \{
if used name
fstr def_name name
end if
\}
common
match needed, needed@dynamic \{
irp item, needed \\{
match str:cnt:use:library,item \\\{
use = cnt
if use > 0
str db library, 0
end if
\\\}
\\}
\}
strsz = $-strtab
forward
match cnt:name, cntandname \{
label name dword
if used name
dd 0
end if
__define_import_arguments name
\}
}
macro ImportAll {
match arguments, __do_import imported@dynamic \{ arguments \}
}
|