Lines Matching refs:pe_def_file
151 def_file * pe_def_file = 0;
402 /* These correspond to the entries in pe_def_file->exports[]. I use
573 if (!pe_def_file)
574 pe_def_file = def_file_empty ();
587 def_file_add_directive (pe_def_file, buf, size);
594 if (!pe_dll_export_everything && pe_def_file->num_exports == 0
599 if (pe_dll_export_everything || pe_def_file->num_exports == 0)
641 if (auto_export (b, pe_def_file, sn))
644 p=def_file_add_export (pe_def_file, sn, 0, -1);
654 #define NE pe_def_file->num_exports
661 if (strchr (pe_def_file->exports[i].name, '@'))
666 int lead_at = (*pe_def_file->exports[i].name == '@');
667 char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
674 pe_def_file->exports[i].name);
675 pe_def_file->exports[i].name = tmp;
684 if (is_import (pe_def_file->exports[i].name))
687 if (strchr (pe_def_file->exports[i].name, '@'))
689 int lead_at = (*pe_def_file->exports[i].name == '@');
690 char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
693 if (auto_export (NULL, pe_def_file, tmp))
694 def_file_add_export (pe_def_file, tmp,
695 pe_def_file->exports[i].internal_name,
704 e = pe_def_file->exports;
716 qsort (pe_def_file->exports, NE, sizeof (pe_def_file->exports[0]),
754 pe_def_file->num_exports = j; /* == NE */
761 if (strchr (pe_def_file->exports[i].internal_name, '.'))
764 if (!pe_def_file->exports[i].flag_noname)
767 pe_def_file->exports[i].flag_forward = 1;
769 if (pe_def_file->exports[i].ordinal != -1)
771 if (max_ordinal < pe_def_file->exports[i].ordinal)
772 max_ordinal = pe_def_file->exports[i].ordinal;
773 if (min_ordinal > pe_def_file->exports[i].ordinal)
774 min_ordinal = pe_def_file->exports[i].ordinal;
781 name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
783 && (*pe_def_file->exports[i].internal_name != '@'))
786 strcpy (name + 1, pe_def_file->exports[i].internal_name);
789 strcpy (name, pe_def_file->exports[i].internal_name);
800 if (!pe_def_file->exports[i].flag_noname)
811 if (pe_def_file->exports[i].ordinal != -1)
813 if (max_ordinal < pe_def_file->exports[i].ordinal)
814 max_ordinal = pe_def_file->exports[i].ordinal;
815 if (min_ordinal > pe_def_file->exports[i].ordinal)
816 min_ordinal = pe_def_file->exports[i].ordinal;
824 pe_def_file->exports[i].internal_name);
830 pe_def_file->exports[i].internal_name,
837 pe_def_file->exports[i].internal_name);
908 if (pe_def_file->name)
909 dll_name = pe_def_file->name;
939 pe_def_file->exports[i].flag_forward)
941 if (pe_def_file->exports[i].ordinal != -1)
943 int ei = pe_def_file->exports[i].ordinal - min_ordinal;
950 pe_def_file->exports[i].ordinal,
951 pe_def_file->exports[i].name,
952 pe_def_file->exports[pi].name);
956 name_table_size += strlen (pe_def_file->exports[i].name) + 1;
960 if (pe_def_file->exports[i].flag_forward)
962 name_table_size += strlen (pe_def_file->exports[i].internal_name) + 1;
969 pe_def_file->exports[i].flag_forward) &&
970 pe_def_file->exports[i].ordinal == -1)
976 pe_def_file->exports[i].ordinal = next_ordinal;
996 for (i = 0; i < pe_def_file->num_exports; i++)
1000 name = xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
1002 && *pe_def_file->exports[i].internal_name != '@')
1005 strcpy (name + 1, pe_def_file->exports[i].internal_name);
1008 strcpy (name, pe_def_file->exports[i].internal_name);
1048 if (pe_def_file->version_major != -1)
1050 bfd_put_16 (abfd, pe_def_file->version_major, edata_d + 8);
1051 bfd_put_16 (abfd, pe_def_file->version_minor, edata_d + 10);
1076 if (pe_def_file->exports[s].ordinal != -1 &&
1077 (pe_def_file->exports[s].flag_forward || ssec != NULL))
1079 int ord = pe_def_file->exports[s].ordinal;
1081 if (pe_def_file->exports[s].flag_forward)
1086 strcpy (enamestr, pe_def_file->exports[s].internal_name);
1087 enamestr += strlen (pe_def_file->exports[s].internal_name) + 1;
1099 if (!pe_def_file->exports[s].flag_noname)
1101 char *ename = pe_def_file->exports[s].name;
1109 pe_def_file->exports[s].hint = hint++;
1428 if (pe_def_file)
1430 if (pe_def_file->name)
1432 if (pe_def_file->is_dll)
1437 quoteput (pe_def_file->name, out, 1);
1445 if (pe_def_file->description)
1448 quoteput (pe_def_file->description, out, 1);
1452 if (pe_def_file->version_minor != -1)
1453 fprintf (out, "VERSION %d.%d\n", pe_def_file->version_major,
1454 pe_def_file->version_minor);
1455 else if (pe_def_file->version_major != -1)
1456 fprintf (out, "VERSION %d\n", pe_def_file->version_major);
1458 if (pe_def_file->stack_reserve != -1 || pe_def_file->heap_reserve != -1)
1461 if (pe_def_file->stack_commit != -1)
1463 pe_def_file->stack_reserve, pe_def_file->stack_commit);
1464 else if (pe_def_file->stack_reserve != -1)
1465 fprintf (out, "STACKSIZE 0x%x\n", pe_def_file->stack_reserve);
1467 if (pe_def_file->heap_commit != -1)
1469 pe_def_file->heap_reserve, pe_def_file->heap_commit);
1470 else if (pe_def_file->heap_reserve != -1)
1471 fprintf (out, "HEAPSIZE 0x%x\n", pe_def_file->heap_reserve);
1473 if (pe_def_file->num_section_defs > 0)
1477 for (i = 0; i < pe_def_file->num_section_defs; i++)
1480 quoteput (pe_def_file->section_defs[i].name, out, 0);
1482 if (pe_def_file->section_defs[i].class)
1485 quoteput (pe_def_file->section_defs[i].class, out, 0);
1488 if (pe_def_file->section_defs[i].flag_read)
1491 if (pe_def_file->section_defs[i].flag_write)
1494 if (pe_def_file->section_defs[i].flag_execute)
1497 if (pe_def_file->section_defs[i].flag_shared)
1504 if (pe_def_file->num_exports > 0)
1508 for (i = 0; i < pe_def_file->num_exports; i++)
1510 def_file_export *e = pe_def_file->exports + i;
1539 if (pe_def_file->num_imports > 0)
1543 for (i = 0; i < pe_def_file->num_imports; i++)
1545 def_file_import *im = pe_def_file->imports + i;
2414 if (pe_def_file->exports[i].flag_private)
2470 if (!pe_def_file)
2473 for (module = pe_def_file->modules; module; module = module->next)
2485 for (i = 0; i < pe_def_file->num_imports; i++)
2486 if (pe_def_file->imports[i].module == module)
2490 int lead_at = (*pe_def_file->imports[i].internal_name == '@');
2492 size_t len = strlen (pe_def_file->imports[i].internal_name);
2498 pe_def_file->imports[i].internal_name);
2501 pe_def_file->imports[i].internal_name);
2512 pe_def_file->imports[i].internal_name);
2515 pe_def_file->imports[i].internal_name);
2535 exp.internal_name = pe_def_file->imports[i].internal_name;
2536 exp.name = pe_def_file->imports[i].name;
2537 exp.ordinal = pe_def_file->imports[i].ordinal;
2541 exp.flag_data = pe_def_file->imports[i].data;
2719 if (pe_def_file == 0)
2720 pe_def_file = def_file_empty ();
2735 if (def_get_module (pe_def_file, dll_name))
2763 imp = def_file_add_import (pe_def_file, erva + name_rva,
2789 if (pe_def_file->num_exports == 0 && !info->shared)