Home | History | Annotate | Download | only in core

Lines Matching defs:astate

22 static struct aout_state astate;
28 if (len < sizeof(astate.head)) {
31 memcpy(&astate.head, data, sizeof(astate.head));
32 if ((astate.head.a_midmag & 0xffff) != 0x010BL) {
40 start = astate.head.a_entry;
41 mid = (((start + astate.head.a_text) + 4095) & ~4095) + astate.head.a_data;
42 end = ((mid + 4095) & ~4095) + astate.head.a_bss;
47 astate.segment = -1;
48 astate.loc = 0;
49 astate.skip = 0;
50 astate.toread = 0;
61 astate.segment++;
62 if (astate.segment == 0) {
63 astate.curaddr = 0x100000;
64 astate.head.a_entry = astate.curaddr + 0x20;
66 memcpy(phys_to_virt(astate.curaddr), data, len);
67 astate.curaddr += len;
72 if (astate.segment != -1) {
73 if (astate.skip) {
74 if (astate.skip >= len - offset) {
75 astate.skip -= len - offset;
78 offset += astate.skip;
79 astate.skip = 0;
82 if (astate.toread) {
83 if (astate.toread >= len - offset) {
84 memcpy(phys_to_virt(astate.curaddr), data+offset,
86 astate.curaddr += len - offset;
87 astate.toread -= len - offset;
90 memcpy(phys_to_virt(astate.curaddr), data+offset, astate.toread);
91 offset += astate.toread;
92 astate.toread = 0;
98 astate.segment++;
99 switch (astate.segment) {
102 astate.curaddr = astate.head.a_entry;
103 astate.skip = 4096;
104 astate.toread = astate.head.a_text;
111 astate.skip = ((astate.curaddr + 4095) & ~4095) - astate.curaddr;
112 astate.curaddr = (astate.curaddr + 4095) & ~4095;
113 astate.toread = astate.head.a_data;
117 astate.curaddr = (astate.curaddr + 4095) & ~4095;
118 astate.skip = 0;
119 astate.toread = 0;
120 memset(phys_to_virt(astate.curaddr), '\0', astate.head.a_bss);
127 astate.loc += len;
133 entry = astate.head.a_entry;