Lines Matching defs:ex

112 static const struct exec *ex;
210 ex = (const struct exec *) align_struct(file_base);
212 printf("%s: a_midmag = 0x%lx\n", fname, (long)ex->a_midmag);
214 (long)N_GETMAGIC(*ex), (long)N_GETMAGIC(*ex),
215 (long)N_GETMAGIC_NET(*ex), (long)N_GETMAGIC_NET(*ex));
217 if (N_BADMAG(*ex)) {
224 printf(" a_text = 0x%lx\n", (long)ex->a_text);
225 printf(" a_data = 0x%lx\n", (long)ex->a_data);
226 printf(" a_bss = 0x%lx\n", (long)ex->a_bss);
227 printf(" a_syms = 0x%lx\n", (long)ex->a_syms);
228 printf(" a_entry = 0x%lx\n", (long)ex->a_entry);
229 printf(" a_trsize = 0x%lx\n", (long)ex->a_trsize);
230 printf(" a_drsize = 0x%lx\n", (long)ex->a_drsize);
232 text_base = file_base + N_TXTOFF(*ex);
233 data_base = file_base + N_DATOFF(*ex);
235 align_struct(file_base + N_RELOFF(*ex));
236 sym_base = (const struct nlist *) align_struct(file_base + N_SYMOFF(*ex));
237 str_base = file_base + N_STROFF(*ex);
239 rel_count = (ex->a_trsize + ex->a_drsize) / sizeof rel_base[0];
240 assert(rel_count * sizeof rel_base[0] == ex->a_trsize + ex->a_drsize);
241 sym_count = ex->a_syms / sizeof sym_base[0];
242 assert(sym_count * sizeof sym_base[0] == ex->a_syms);
249 printf(" Entry = 0x%lx\n", (long)ex->a_entry);
250 printf(" Text offset = %x, address = %lx\n", N_TXTOFF(*ex),
251 (long)N_TXTADDR(*ex));
252 printf(" Data offset = %lx, address = %lx\n", (long)N_DATOFF(*ex),
253 (long)N_DATADDR(*ex));
257 * the assumed run-time load address, i.e., N_TXTADDR(*ex), i.e., 0x1000.
260 * start of the file, i.e., N_TXTOFF(*ex), i.e., 0.
262 * The way to tell the difference is by looking at ex->a_entry. If it
281 if (ex->a_entry >= PAGE_SIZE) { /* Executable, not a shared library */
284 * assumption that the object will be loaded at N_TXTADDR(*ex).
291 } else if (N_GETFLAG(*ex) & EX_DYNAMIC)
296 if (N_GETFLAG(*ex) & EX_DYNAMIC) {
361 && (unsigned long)r->r_address < origin + ex->a_text + ex->a_data
421 printf(" Text segment starts at address %lx\n", origin + N_TXTOFF(*ex));
422 if (N_GETFLAG(*ex) & EX_DYNAMIC) {
429 printf(" Data segment starts at address %lx\n", origin + N_DATOFF(*ex));
430 if (N_GETFLAG(*ex) & EX_DYNAMIC) {
431 printf(" _dynamic starts at %lx\n", origin + N_DATOFF(*ex));