Fresh IDE . Diff
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Differences From Artifact [4fdf362ff0]:

To Artifact [874573fd5d]:


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
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 name, args {
macro __define_import_arguments_var [argument] {
common
  virtual at ebp+8
forward
    name#argument dd ?
  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
      __define_import_arguments_var name, name#@arg
      match A, name#@arg \{ __define_import_arguments_var A \}
      .__info.argtype = 2
    end if
  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
177
178
179
180
181
182
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
      name dd 0
       dd 0
    end if

    __define_import_arguments name
__define_import_arguments name
  \}
}


macro ImportAll {
  match arguments, __do_import imported@dynamic \{ arguments \}
}