Lines Matching defs:to

1 /* dlltool.c -- tool to generate stuff for PE style DLLs
18 along with this program; if not, write to the Free Software
23 /* This program allows you to build the files necessary to create
24 DLLs to run on a system which understands PE format image files.
33 which the runtime loader needs to tie up references from a
45 The result is going to be <name>.EXE
48 The result is going to be <name>.DLL
61 is <integer> is to be imported from the file <module-name>. If
63 function will be refereed to in the body of the DLL.
82 file to this program is equivalent to a EXPORTS <name>
91 The .exp.s file contains the information necessary to export
93 necessary to use the DLL's routines from a referencing program.
155 # (you don't have to, you could name all the object
163 # (You may have to use -S to tell dlltool where to find the assembler).
202 subsections used to keep the pieces for each dll together: .idata$[234567].
208 DWORD Import Lookup Table; - pointer to .idata$4
211 DWORD Name; - pointer to dll's name
212 PIMAGE_THUNK_DATA FirstThunk; - pointer to .idata$5
217 = array of array of pointers to hint name table.
222 = array of array of pointers to hint name table.
225 Initially, this table is identical to the Import Lookup Table. However,
235 /* AIX requires this to be the first thing in the file. */
322 encountered, it is broken up into its component parts and passed to
323 def_import. IMPORT_LIST is initialized to NULL in function main. */
372 /* Default symbols to exclude when exporting all the symbols. */
375 /* TRUE if we should add __imp_<SYMBOL> to import libraries for backward
376 compatibility to old Cygwin releases. */
513 to restore the toc saved by the third instruction in
913 static dlist_type *a_list; /* Stuff to go in directives. */
1034 /* append_import simply adds the given import definition to the global
1073 declaration, the module name may or may not need ".dll" to be
1074 appended to it, the name of the function may be stored in internal
1079 In defparse.y we have to accept import declarations which follow
1087 passed to def_import() in the "module" parameter, but when it ends
1089 to be reappended.
1237 /* Look for a list of symbols to export in the .drectve section of
1238 ABFD. Pass each one to def_exports. */
1315 /* Look through the symbols in MINISYMS, and add each one to list of
1316 symbols to export. */
1359 /* Add a list of symbols to exclude. */
1392 /* See if STRING is on the list of symbols to exclude. */
1405 /* Add the default list of symbols to exclude. */
1413 /* Choose which symbols to export. */
1418 bfd_byte *from, *fromend, *to;
1427 to = (bfd_byte *) minisyms;
1448 memcpy (to, from, size);
1449 to += size;
1453 return (to - (bfd_byte *) minisyms) / size;
1456 /* Export all symbols in ABFD, except for ones we were told not to
1468 and we don't want to reexport them from here. */
1490 /* Discard the symbols we don't want to export. It's OK to do this
1499 /* Look at the object file to decide which symbols to export. */
1509 /* FIXME: we ought to read in and block out the base relocations. */
1522 fatal (_("Unable to open object file: %s"), filename);
1626 inform (_("Adding exports to output file"));
1674 inform (_("Added exports to output file"));
1678 for the idata sections. It appends the source code to the end of
1818 fatal (_("Unable to open temporary assembler file: %s"), TMP_ASM);
1832 fprintf (f, "\t%sname%s %s Ptr to name of dll\n", ASM_RVA_BEFORE, ASM_RVA_AFTER, ASM_C);
1956 /* Add to the output file a way of getting to the exported names
2119 /* Sections numbered to make the order the same as other PowerPC NT
2148 /* This is what we're trying to make. We generate the imp symbols with
2174 # Rather than a simple "jmp *", the code to get to the dll function
2298 /* On PowerPC, the function name points to a descriptor in
2300 pointer to the code (..function_name), and the second
2301 points to the .toc. */
2353 /* The symbol referring to the code (.text). */
2434 rva to idata$6. */
2496 /* This used to add 1 to exp->hint. I don't know
2536 /* So this pdata section setups up this as a glue linkage to
2538 we need to do:
2541 4, and 0x10 are set to point to the same place:
2544 The actual glue instruction to restore the toc on
2548 3. Lastly, the HandlerData field is set to 0x03, to indicate
2552 /* Alignment must be set to 2**2 or you get extra stuff. */
2603 We use relocs to build this. */
2672 fatal (_("failed to open temporary head file: %s"), TMP_HEAD_S);
2683 fprintf (f, "\t%shname%s\t%sPtr to image import by name list\n",
2695 fprintf (f, "\t%sfthunk%s\t%s pointer to firstthunk\n",
2734 fatal (_("failed to open temporary tail file: %s"), TMP_TAIL_S);
2759 /* Normally, we need to see a null descriptor built in idata$3 to
2761 would be to mark this section as a comdat type 2 section, so
2763 comdat, that is) or cause it to be inserted by something else (say
2817 /* Work out a reasonable size of things to put onto one line. */
2827 /* Don't add PRIVATE entries to import lib. */
2920 /* Unset ordinals go to the bottom. */
3043 /* Now fill in ordinals where the user wants us to choose. */
3141 fprintf (file, _(" -a --add-indirect Add dll indirects to export file.\n"));
3142 fprintf (file, _(" -D --dllname <name> Name of input dll to put into interface lib.\n"));
3143 fprintf (file, _(" -d --input-def <deffile> Name of .def file to be read in.\n"));
3144 fprintf (file, _(" -z --output-def <deffile> Name of .def file to be created.\n"));
3145 fprintf (file, _(" --export-all-symbols Export all symbols to .def\n"));
3152 fprintf (file, _(" -U --add-underscore Add underscores to all symbols in interface library.\n"));
3153 fprintf (file, _(" --add-stdcall-underscore Add underscores to stdcall symbols in interface library.\n"));
3158 fprintf (file, _(" -f --as-flags <flags> Pass <flags> to the assembler.\n"));
3161 fprintf (file, _(" -t --temp-prefix <prefix> Use <prefix> to construct temp file names.\n"));
3169 fprintf (file, _(" -F --linker-flags <flags> Pass <flags> to the linker.\n"));
3172 fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
3337 fatal (_("Unable to open base-file: %s"), optarg);
3390 to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
3440 string running from PREFIX to END_PREFIX. If the concatenated
3485 /* Deduce the name of the program we are want to invoke.
3486 PROG_NAME is the basic name of the program we want to run,
3490 If argv[0] contains the full path, then try to find the program
3594 /* Step one. Run 'ld -r' on the input object files in order to resolve
3595 any internal references and to generate a single .exports section. */
3647 /* XXX - FIME: ought to check/copy other command line options as well. */
3652 /* Step four. Feed the .exp and object files to ld -shared to create the dll. */