at\fR \fIformat\fR" 4 .IX Item "--input-format format" .PD The input format to read. \fIformat\fR may be \fBres\fR, \fBrc\fR, or \&\fBcoff\fR. If no input format is specified, \fBwindres\fR will guess, as described above. .IP "\fB\-O\fR \fIformat\fR" 4 .IX Item "-O format" .PD 0 .IP "\fB\-\-output\-format\fR \fIformat\fR" 4 .IX Item "--output-format format" .PD The output format to generate. \fIformat\fR may be \fBres\fR, \&\fBrc\fR, or \fBcoff\fR. If no output format is specified, \&\fBwindres\fR will guess, as described above. .IP "\fB\-F\fR \fItarget\fR" 4 .IX Item "-F target" .PD 0 .IP "\fB\-\-target\fR \fItarget\fR" 4 .IX Item "--target target" .PD Specify the \s-1BFD\s0 format to use for a \s-1COFF\s0 file as input or output. This is a \s-1BFD\s0 target name; you can use the \fB\-\-help\fR option to see a list of supported targets. Normally \fBwindres\fR will use the default format, which is the first one listed by the \fB\-\-help\fR option. .IP "\fB\-\-preprocessor\fR \fIprogram\fR" 4 .IX Item "--preprocessor program" When \fBwindres\fR reads an \f(CW\*(C`rc\*(C'\fR file, it runs it through the C preprocessor first. This option may be used to specify the preprocessor to use, including any leading arguments. The default preprocessor argument is \f(CW\*(C`gcc \-E \-xc\-header \-DRC_INVOKED\*(C'\fR. .IP "\fB\-I\fR \fIdirectory\fR" 4 .IX Item "-I directory" .PD 0 .IP "\fB\-\-include\-dir\fR \fIdirectory\fR" 4 .IX Item "--include-dir directory" .PD Specify an include directory to use when reading an \f(CW\*(C`rc\*(C'\fR file. \&\fBwindres\fR will pass this to the preprocessor as an \fB\-I\fR option. \fBwindres\fR will also search this directory when looking for files named in the \f(CW\*(C`rc\*(C'\fR file. If the argument passed to this command matches any of the supported \fIformats\fR (as described in the \fB\-J\fR option), it will issue a deprecation warning, and behave just like the \&\fB\-J\fR option. New programs should not use this behaviour. If a directory happens to match a \fIformat\fR, simple prefix it with \fB./\fR to disable the backward compatibility. .IP "\fB\-D\fR \fItarget\fR" 4 .IX Item "-D target" .PD 0 .IP "\fB\-\-define\fR \fIsym\fR\fB[=\fR\fIval\fR\fB]\fR" 4 .IX Item "--define sym[=val]" .PD Specify a \fB\-D\fR option to pass to the preprocessor when reading an \&\f(CW\*(C`rc\*(C'\fR file. .IP "\fB\-U\fR \fItarget\fR" 4 .IX Item "-U target" .PD 0 .IP "\fB\-\-undefine\fR \fIsym\fR" 4 .IX Item "--undefine sym" .PD Specify a \fB\-U\fR option to pass to the preprocessor when reading an \&\f(CW\*(C`rc\*(C'\fR file. .IP "\fB\-r\fR" 4 .IX Item "-r" Ignored for compatibility with rc. .IP "\fB\-v\fR" 4 .IX Item "-v" Enable verbose mode. This tells you what the preprocessor is if you didn't specify one. .IP "\fB\-c\fR \fIval\fR" 4 .IX Item "-c val" .PD 0 .IP "\fB\-\-codepage\fR \fIval\fR" 4 .IX Item "--codepage val" .PD Specify the default codepage to use when reading an \f(CW\*(C`rc\*(C'\fR file. \&\fIval\fR should be a hexadecimal prefixed by \fB0x\fR or decimal codepage code. The valid range is from zero up to 0xffff, but the validity of the codepage is host and configuration dependent. .IP "\fB\-l\fR \fIval\fR" 4 .IX Item "-l val" .PD 0 .IP "\fB\-\-language\fR \fIval\fR" 4 .IX Item "--language val" .PD Specify the default language to use when reading an \f(CW\*(C`rc\*(C'\fR file. \&\fIval\fR should be a hexadecimal language code. The low eight bits are the language, and the high eight bits are the sublanguage. .IP "\fB\-\-use\-temp\-file\fR" 4 .IX Item "--use-temp-file" Use a temporary file to instead of using popen to read the output of the preprocessor. Use this option if the popen implementation is buggy on the host (eg., certain non-English language versions of Windows 95 and Windows 98 are known to have buggy popen where the output will instead go the console). .IP "\fB\-\-no\-use\-temp\-file\fR" 4 .IX Item "--no-use-temp-file" Use popen, not a temporary file, to read the output of the preprocessor. This is the default behaviour. .IP "\fB\-h\fR" 4 .IX Item "-h" .PD 0 .IP "\fB\-\-help\fR" 4 .IX Item "--help" .PD Prints a usage summary. .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Prints the version number for \fBwindres\fR. .IP "\fB\-\-yydebug\fR" 4 .IX Item "--yydebug" If \fBwindres\fR is compiled with \f(CW\*(C`YYDEBUG\*(C'\fR defined as \f(CW1\fR, this will turn on parser debugging. .IP "\fB@\fR\fIfile\fR" 4 .IX Item "@file" Read command-line options from \fIfile\fR. The options read are inserted in place of the original @\fIfile\fR option. If \fIfile\fR does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in \fIfile\fR are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The \fIfile\fR may itself contain additional @\fIfile\fR options; any such options will be processed recursiv†Ôely. .SH "SEE ALSO" .IX Header "SEE ALSO" the Info entries for \fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DLLTOOL 1" .TH DLLTOOL 1 "2010-12-08" "binutils-2.21" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dlltool \- Create files needed to build and use DLLs. .SH "SYNOPSIS" .IX Header "SYNOPSIS" dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR] [\fB\-b\fR|\fB\-\-base\-file\fR \fIbase-file-name\fR] [\fB\-e\fR|\fB\-\-output\-exp\fR \fIexports-file-name\fR] [\fB\-z\fR|\fB\-\-output\-def\fR \fIdef-file-name\fR] [\fB\-l\fR|\fB\-\-output\-lib\fR \fIlibrary-file-name\fR] [\fB\-y\fR|\fB\-\-output\-delaylib\fR \fIlibrary-file-name\fR] [\fB\-\-export\-all\-symbols\fR] [\fB\-\-no\-export\-all\-symbols\fR] [\fB\-\-exclude\-symbols\fR \fIlist\fR] [\fB\-\-no\-default\-excludes\fR] [\fB\-S\fR|\fB\-\-as\fR \fIpath-to-assembler\fR] [\fB\-f\fR|\fB\-\-as\-flags\fR \fIoptions\fR] [\fB\-D\fR|\fB\-\-dllname\fR \fIname\fR] [\fB\-m\fR|\fB\-\-machine\fR \fImachine\fR] [\fB\-a\fR|\fB\-\-add\-indirect\fR] [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-\-add\-stdcall\-underscore\fR] [\fB\-k\fR|\fB\-\-kill\-at\fR] [\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR] [\fB\-p\fR|\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR] [\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] [\fB\-\-use\-nul\-prefixed\-import\-tables\fR] [\fB\-I\fR|\fB\-\-identify\fR \fIlibrary-file-name\fR] [\fB\-\-identify\-strict\fR] [\fB\-i\fR|\fB\-\-interwork\fR] [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fB\-\-no\-leading\-underscore\fR] [\fB\-\-leading\-underscore\fR] [object\-file ...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdlltool\fR reads its inputs, which can come from the \fB\-d\fR and \&\fB\-b\fR options as well as object files specified on the command line. It then processes these inputs and if the \fB\-e\fR option has been specified it creates a exports file. If the \fB\-l\fR option has been specified it creates a library file and if the \fB\-z\fR option has been specified it creates a def file. Any or all of the \fB\-e\fR, \&\fB\-l\fR and \fB\-z\fR options can be present in one invocation of dlltool. .PP When creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is necessary to have three other files. \fBdlltool\fR can help with the creation of these files. .PP The first file is a \fI.def\fR file which specifies which functions are exported from the \s-1DLL\s0, which functions the \s-1DLL\s0 imports, and so on. This is a text file and can be created by hand, or \fBdlltool\fR can be used to create it using the \fB\-z\fR option. In this case \fBdlltool\fR will scan the object files specified on its command line looking for those functions which have been specially marked as being exported and put entries for them in the \fI.def\fR file it creates. .PP In order to mark a function as being exported from a \s-1DLL\s0, it needs to have an \fB\-export:\fR entry in the \fB.drectve\fR section of the object file. This can be done in C by using the \&\fIasm()\fR operator: .PP .Vb 2 \& asm (".section .drectve"); \& asm (".ascii \e"\-export:my_func\e""); \& \& int my_func (void) { ... } .Ve .PP The second file needed for \s-1DLL\s0 creation is an exports file. This file is linked with the object files that make up the body of the \s-1DLL\s0 and it handles the interface between the \s-1DLL\s0 and the outside world. This is a binary file and it can be created by giving the \fB\-e\fR option to \&\fBdlltool\fR when it is creating or reading in a \fI.def\fR file. .PP The third file needed for \s-1DLL\s0 creation is the library file that programs will link with in order to access the functions in the \s-1DLL\s0 (an `import library'). This file can be created by giving the \fB\-l\fR option to dlltool when it is creating or reading in a \fI.def\fR file. .PP If the \fB\-y\fR option is specified, dlltool generates a delay-import library that can be used instead of the normal import library to allow a program to link to the dll only as soon as an imported function is called for the first time. The resulting executable will need to be linked to the static delayimp library containing _\|\fI_delayLoadHelper2()\fR, which in turn will import LoadLibraryA and GetProcAddress from kernel32. .PP \&\fBdlltool\fR builds the library file by hand, but it builds the exports file by creating temporary files containing assembler statements and then assembling these. The \fB\-S\fR command line option can be used to specify the path to the assembler that dlltool will use, and the \fB\-f\fR option can be used to pass specific flags to that assembler. The \fB\-n\fR can be used to prevent dlltool from deleting these temporary assembler files when it is done, and if \fB\-n\fR is specified twice then this will prevent dlltool from deleting the temporary object files it used to build the library. .PP Here is an example of creating a \s-1DLL\s0 from a source file \fBdll.c\fR and also creating a program (from an object file called \fBprogram.o\fR) that uses that \s-1DLL:\s0 .PP .Vb 4 \& gcc \-c dll.c \& dlltool \-e exports.o \-l dll.lib dll.o \& gcc dll.o exports.o \-o dll.dll \& gcc program.o dll.lib \-o program .Ve .PP \&\fBdlltool\fR may also be used to query an existing import library to determine the name of the \s-1DLL\s0 to which it is associated. See the description of the \fB\-I\fR or \fB\-\-identify\fR option. .SH "OPTIONS" .IX Header "OPTIONS" The command line options have the following meanings: .IP "\fB\-d\fR \fIfilename\fR" 4 .IX Item "-d filename" .PD 0 .IP "\fB\-\-input\-def\fR \fIfilename\fR" 4 .IX Item "--input-def filename" .PD Specifies the name of a \fI.def\fR file to be read in and processed. .IP "\fB\-b\fR \fIfilename\fR" 4 .IX Item "-b filename" .PD 0 .IP "\fB\-\-base\-file\fR \fIfilename\fR" 4 .IX Item "--base-file filename" .PD Specifies the name of a base file to be read in and processed. The contents of this file will be added to the relocation section in the exports file generated by dlltool. .IP "\fB\-e\fR \fIfilename\fR" 4 .IX Item "-e filename" .PD 0 .IP "\fB\-\-output\-exp\fR \fIfilename\fR" 4 .IX Item "--output-exp filename" .PD Specifies the name of the export file to be created by dlltool. .IP "\fB\-z\fR \fIfilename\fR" 4 .IX Item "-z filename" .PD 0 .IP "\fB\-\-output\-def\fR \fIfilename\fR" 4 .IX Item "--output-def filename" .PD Specifies the name of the \fI.def\fR file to be created by dlltool. .IP "\fB\-l\fR \fIfilename\fR" 4 .IX Item "-l filename" .PD 0 .IP "\fB\-\-output\-lib\fR \fIfilename\fR" 4 .IX Item "--output-lib filename" .PD Specifies the name of the library file to be created by dlltool. .IP "\fB\-y\fR \fIfilename\fR" 4 .IX Item "-y filename" .PD 0 .IP "\fB\-\-output\-delaylib\fR \fIfilename\fR" 4 .IX Item "--output-delaylib filename" .PD Specifies the name of the delay-import library file to be created by dlltool. .IP "\fB\-\-export\-all\-symbols\fR" 4 .IX Item "--export-all-symbols" Treat all global and weak defined symbols found in the input object files as symbols to be exported. There is a small list of symbols which are not exported by default; see the \fB\-\-no\-default\-excludes\fR option. You may add to the list of symbols to not export by using the \&\fB\-\-exclude\-symbols\fR option. .IP "\fB\-\-no\-export\-all\-symbols\fR" 4 .IX Item "--no-export-all-symbols" Only export symbols explicitly listed in an input \fI.def\fR file or in \&\fB.drectve\fR sections in the input object files. This is the default behaviour. The \fB.drectve\fR sections are created by \fBdllexport\fR attributes in the source code. .IP "\fB\-\-exclude\-symbols\fR \fIlist\fR" 4 .IX Item "--exclude-symbols list" Do not export the symbols in \fIlist\fR. This is a list of symbol names separated by comma or colon characters. The symbol names should not contain a leading underscore. This is only meaningful when \&\fB\-\-export\-all\-symbols\fR is used. .IP "\fB\-\-no\-default\-excludes\fR" 4 .IX Item "--no-default-excludes" When \fB\-\-export\-all\-symbols\fR is used, it will by default avoid exporting certain special symbols. The current list of symbols to avoid exporting is \fBDllMain@12\fR, \fBDllEntryPoint@0\fR, \&\fBimpure_ptr\fR. You may use the \fB\-\-no\-default\-excludes\fR option to go a”Ô•Ô–Ô—Ô˜Ô™ÔšÔ›ÔœÔhead and export these special symbols. This is only meaningful when \fB\-\-export\-all\-symbols\fR is used. .IP "\fB\-S\fR \fIpath\fR" 4 .IX Item "-S path" .PD 0 .IP "\fB\-\-as\fR \fIpath\fR" 4 .IX Item "--as path" .PD Specifies the path, including the filename, of the assembler to be used to create the exports file. .IP "\fB\-f\fR \fIoptions\fR" 4 .IX Item "-f options" .PD 0 .IP "\fB\-\-as\-flags\fR \fIoptions\fR" 4 .IX Item "--as-flags options" .PD Specifies any specific command line options to be passed to the assembler when building the exports file. This option will work even if the \fB\-S\fR option is not used. This option only takes one argument, and if it occurs more than once on the command line, then later occurrences will override earlier occurrences. So if it is necessary to pass multiple options to the assembler they should be enclosed in double quotes. .IP "\fB\-D\fR \fIname\fR" 4 .IX Item "-D name" .PD 0 .IP "\fB\-\-dll\-name\fR \fIname\fR" 4 .IX Item "--dll-name name" .PD Specifies the name to be stored in the \fI.def\fR file as the name of the \s-1DLL\s0 when the \fB\-e\fR option is used. If this option is not present, then the filename given to the \fB\-e\fR option will be used as the name of the \s-1DLL\s0. .IP "\fB\-m\fR \fImachine\fR" 4 .IX Item "-m machine" .PD 0 .IP "\fB\-machine\fR \fImachine\fR" 4 .IX Item "-machine machine" .PD Specifies the type of machine for which the library file should be built. \fBdlltool\fR has a built in default type, depending upon how it was created, but this option can be used to override that. This is normally only useful when creating DLLs for an \s-1ARM\s0 processor, when the contents of the \s-1DLL\s0 are actually encode using Thumb instructions. .IP "\fB\-a\fR" 4 .IX Item "-a" .PD 0 .IP "\fB\-\-add\-indirect\fR" 4 .IX Item "--add-indirect" .PD Specifies that when \fBdlltool\fR is creating the exports file it should add a section which allows the exported functions to be referenced without using the import library. Whatever the hell that means! .IP "\fB\-U\fR" 4 .IX Item "-U" .PD 0 .IP "\fB\-\-add\-underscore\fR" 4 .IX Item "--add-underscore" .PD Specifies that when \fBdlltool\fR is creating the exports file it should prepend an underscore to the names of \fIall\fR exported symbols. .IP "\fB\-\-no\-leading\-underscore\fR" 4 .IX Item "--no-leading-underscore" .PD 0 .IP "\fB\-\-leading\-underscore\fR" 4 .IX Item "--leading-underscore" .PD Specifies whether standard symbol should be forced to be prefixed, or not. .IP "\fB\-\-add\-stdcall\-underscore\fR" 4 .IX Item "--add-stdcall-underscore" Specifies that when \fBdlltool\fR is creating the exports file it should prepend an underscore to the names of exported \fIstdcall\fR functions. Variable names and non-stdcall function names are not modified. This option is useful when creating GNU-compatible import libs for third party DLLs that were built with MS-Windows tools. .IP "\fB\-k\fR" 4 .IX Item "-k" .PD 0 .IP "\fB\-\-kill\-at\fR" 4 .IX Item "--kill-at" .PD Specifies that when \fBdlltool\fR is creating the exports file it should not append the string \fB@ \fR. These numbers are called ordinal numbers and they represent another way of accessing the function in a \s-1DLL\s0, other than by name. .IP "\fB\-A\fR" 4 .IX Item "-A" .PD 0 .IP "\fB\-\-add\-stdcall\-alias\fR" 4 .IX Item "--add-stdcall-alias" .PD Specifies that when \fBdlltool\fR is creating the exports file it should add aliases for stdcall symbols without \fB@ \fR in addition to the symbols with \fB@ \fR. .IP "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR" 4 .IX Item "--ext-prefix-alias prefix" .PD Causes \fBdlltool\fR to create external aliases for all \s-1DLL\s0 imports with the specified prefix. The aliases are created for both external and import symbols with no leading underscore. .IP "\fB\-x\fR" 4 .IX Item "-x" .PD 0 .IP "\fB\-\-no\-idata4\fR" 4 .IX Item "--no-idata4" .PD Specifies that when \fBdlltool\fR is creating the exports and library files it should omit the \f(CW\*(C`.idata4\*(C'\fR section. This is for compatibility with certain operating systems. .IP "\fB\-\-use\-nul\-prefixed\-import\-tables\fR" 4 .IX Item "--use-nul-prefixed-import-tables" Specifies that when \fBdlltool\fR is creating the exports and library files it should prefix the \f(CW\*(C`.idata4\*(C'\fR and \f(CW\*(C`.idata5\*(C'\fR by zero an element. This emulates old gnu import library generation of \&\f(CW\*(C`dlltool\*(C'\fR. By default this option is turned off. .IP "\fB\-c\fR" 4 .IX Item "-c" .PD 0 .IP "\fB\-\-no\-idata5\fR" 4 .IX Item "--no-idata5" .PD Specifies that when \fBdlltool\fR is creating the exports and library files it should omit the \f(CW\*(C`.idata5\*(C'\fR section. This is for compatibility with certain operating systems. .IP "\fB\-I\fR \fIfilename\fR" 4 .IX Item "-I filename" .PD 0 .IP "\fB\-\-identify\fR \fIfilename\fR" 4 .IX Item "--identify filename" .PD Specifies that \fBdlltool\fR should inspect the import library indicated by \fIfilename\fR and report, on \f(CW\*(C`stdout\*(C'\fR, the name(s) of the associated \s-1DLL\s0(s). This can be performed in addition to any other operations indicated by the other options and arguments. \&\fBdlltool\fR fails if the import library does not exist or is not actually an import library. See also \fB\-\-identify\-strict\fR. .IP "\fB\-\-identify\-strict\fR" 4 .IX Item "--identify-strict" Modifies the behavior of the \fB\-\-identify\fR option, such that an error is reported if \fIfilename\fR is associated with more than one \s-1DLL\s0. .IP "\fB\-i\fR" 4 .IX Item "-i" .PD 0 .IP "\fB\-\-interwork\fR" 4 .IX Item "--interwork" .PD Specifies that \fBdlltool\fR should mark the objects in the library file and exports file that it produces as supporting interworking between \s-1ARM\s0 and Thumb code. .IP "\fB\-n\fR" 4 .IX Item "-n" .PD 0 .IP "\fB\-\-nodelete\fR" 4 .IX Item "--nodelete" .PD Makes \fBdlltool\fR preserve the temporary assembler files it used to create the exports file. If this option is repeated then dlltool will also preserve the temporary object files it uses to create the library file. .IP "\fB\-t\fR \fIprefix\fR" 4 .IX Item "-t prefix" .PD 0 .IP "\fB\-\-temp\-prefix\fR \fIprefix\fR" 4 .IX Item "--temp-prefix prefix" .PD Makes \fBdlltool\fR use \fIprefix\fR when constructing the names of temporary assembler and object files. By default, the temp file prefix is generated from the pid. .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-\-verbose\fR" 4 .IX Item "--verbose" .PD Make dlltool describe what it is doing. .IP "\fB\-h\fR" 4 .IX Item "-h" .PD 0 .IP "\fB\-\-help\fR" 4 .IX Item "--help" .PD Displays a list of command line options and then exits. .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Displays dlltool's version number and then exits. .IP "\fB@\fR\fIfile\fR" 4 .IX Item "@file" Read command-line options from \fIfile\fR. The options read are inserted in place of the original @\fIfile\fR option. If \fIfile\fR does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in \fIfile\fR are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The \fIfile\fR may itself contain additional @\fIfile\fR options; any such options will be processed recursively. .SH "SEE ALSO" .IX Header "SEE ALSO" The Info pages for \fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "C++FILT 1" .TH C++FILT 1 "2010-12-08" "binutils-2.21" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" c++filt \- Demangle C++ and Java symbols. .SH "SYNOPSIS" .IX Header "SYNOPSIS" c++filt [\fB\-_\fR|\fB\-\-strip\-underscores\fR] [\fB\-n\fR|\fB\-\-no\-strip\-underscores\fR] [\fB\-p\fR|\fB\-\-no\-params\fR] [\fB\-t\fR|\fB\-\-types\fR] [\fB\-i\fR|\fB\-\-no\-verbose\fR] [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR] [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \*(C+ and Java languages provide function overloading, which means that you can write many functions with the same name, providing that each function takes parameters of different types. In order to be able to distinguish these similarly named functions \*(C+ and Java encode them into a low-level assembler name which uniquely identifies each different version. This process is known as \fImangling\fR. The \&\fBc++filt\fR [1] program does the inverse mapping: it decodes (\fIdemangles\fR) low-level names into user-level names so that they can be read. .PP Every alphanumeric word (consisting of letters, digits, underscores, dollars, or periods) seen in the input is a potential mangled name. If the name decodes into a \*(C+ name, the \*(C+ name replaces the low-level name in the output, otherwise the original word is output. In this way you can pass an entire assembler source file, containing mangled names, through \fBc++filt\fR and see the same source file containing demangled names. .PP You can also use \fBc++filt\fR to decipher individual symbols by passing them on the command line: .PP .Vb 1 \& c++filt .Ve .PP If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol names from the standard input instead. All the results are printed on the standard output. The difference between reading names from the command line versus reading names from the standard input is that command line arguments are expected to be just mangled names and no checking is performed to separate them from surrounding text. Thus for example: .PP .Vb 1 \& c++filt \-n _Z1fv .Ve .PP will work and demangle the name to \*(L"f()\*(R" whereas: .PP .Vb 1 \& c++filt \-n _Z1fv, .Ve .PP will not work. (Note the extra comma at the end of the mangled name which makes it invalid). This command however will work: .PP .Vb 1 \& echo _Z1fv, | c++filt \-n .Ve .PP and will display \*(L"f(),\*(R", i.e., the demangled name followed by a trailing comma. This behaviour is because when the names are read from the standard input it is expected that they might be part of an assembler source file where there might be extra, extraneous characters trailing after a mangled name. For example: .PP .Vb 1 \& .type _Z1fv, @function .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-_\fR" 4 .IX Item "-_" .PD 0 .IP "\fB\-\-strip\-underscores\fR" 4 .IX Item "--strip-underscores" .PD On some systems, both the C and \*(C+ compilers put an underscore in front of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether \&\fBc++filt\fR removes the underscore by default is target dependent. .IP "\fB\-n\fR" 4 .IX Item "-n" .PD 0 .IP "\fB\-\-no\-strip\-underscores\fR" 4 .IX Item "--no-strip-underscores" .PD Do not remove the initial underscore. .IP "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-no\-params\fR" 4 .IX Item "--no-params" .PD When demangling the name of a function, do not display the types of the function's parameters. .IP "\fB\-t\fR" 4 .IX Item "-t" .PD 0 .IP "\fB\-\-types\fR" 4 .IX Item "--types" .PD Attempt to demangle types as well as function names. This is disabled by default since mangled types are normally only used internally in the compiler, and they can be confused with non-mangled names. For example, a function called \*(L"a\*(R" treated as a mangled type name would be demangled to \*(L"signed char\*(R". .IP "\fB\-i\fR" 4 .IX Item "-i" .PD 0 .IP "\fB\-\-no\-verbose\fR" 4 .IX Item "--no-verbose" .PD Do not include implementation details (if any) in the demangled output. .IP "\fB\-s\fR \fIformat\fR" 4 .IX Item "-s format" .PD 0 .IP "\fB\-\-format=\fR\fIformat\fR" 4 .IX Item "--format=format" .PD \&\fBc++filt\fR can decode various methods of mangling, used by different compilers. The argument to this option selects which method it uses: .RS 4 .ie n .IP """auto""" 4 .el .IP "\f(CWauto\fR" 4 .IX Item "auto" Automatic selection based on executable (the default method) .ie n .IP """gnu""" 4 .el .IP "\f(CWgnu\fR" 4 .IX Item "gnu" the one used by the \s-1GNU\s0 \*(C+ compiler (g++) .ie n .IP """lucid""" 4 .el .IP "\f(CWlucid\fR" 4 .IX Item "lucid" the one used by the Lucid compiler (lcc) .ie n .IP """arm""" 4 .el .IP "\f(CWarm\fR" 4 .IX Item "arm" the one specified by the \*(C+ Annotated Reference Manual .ie n .IP """hp""" 4 .el .IP "\f(CWhp\fR" 4 .IX Item "hp" the one used by the \s-1HP\s0 compiler (aCC) .ie n .IP """edg""" 4 .el .IP "\f(CWedg\fR" 4 .IX Item "edg" the one used by the \s-1EDG\s0 compiler .ie n .IP """gnu\-v3""" 4 .el .IP "\f(CWgnu\-v3\fR" 4 .IX Item "gnu-v3" the one used by the \s-1GNU\s0 \*(C+ compiler (g++) with the V3 \s-1ABI\s0. .ie n .IP """java""" 4 .el .IP "\f(CWjava\fR" 4 .IX Item "java" the one used by the \s-1GNU\s0 Java compiler (gcj) .ie n .IP """gnat""" 4 .el .IP "\f(CWgnat\fR" 4 .IX Item "gnat" the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0). .RE .RS 4 .RE .IP "\fB\-\-help\fR" 4 .IX Item "--help" Print a summary of the options to \fBc++filt\fR and exit. .IP "\fB\-\-version\fR" 4 .IX Item "--version" Print the version number of \fBc++filt\fR and exit. .IP "\fB@\fR\fIfile\fR" 4 .IX Item "@file" Read command-line options from \fIfile\fR. The options read are inserted in place of the original @\fIfile\fR option. If \fIfile\fR does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in \fIfile\fR are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The \fIfile\fR may itself contain additional @\fIfile\fR options; any such options will be processed recursively. .SH "FOOTNOTES" .IX Header "FOOTNOTES" .IP "1." 4 MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on MS-DOS this program is named \fB\s-1CXXFILT\s0\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" the Info entries for \fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "NM 1" .TH NM 1 "2010-12-08" "binutils-2.21" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" nm \- list symbols from object files .SH "SYNOPSIS" .IX Header "SYNOPSIS" nm [\fB\-a\fR|\fB\-\-debug\-syms\fR] [\fB\-g\fR|\fB\-\-extern\-only\fR][\fB\-\-plugin\fR \fIname\fR] [\fB\-B\fR] [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] [\fB\-D\fR|\fB\-\-dynamic\fR] [\fB\-S\fR|\fB\-\-print\-size\fR] [\fB\-s\fR|\fB\-\-print\-armap\fR] [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR][\fB\-\-special\-syms\fR] [\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] [\fB\-p\fR|\fB\-\-no\-sort\fR] [\fB\-r\fR|\fB\-\-reverse\-sort\fR] [\fB\-\-size\-sort\fR] [\fB\-u\fR|\fB\-\-undefined\-only\fR] [\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] [\fB\-P\fR|\fB\-\-portability\fR] [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-f\fR\fIformat\fR|\fB\-\-format=\fR\fIformat\fR] [\fB\-\-defined\-only\fR] [\fB\-l\fR|\fB\-\-line\-numbers\fR] [\fB\-\-no\-demangle\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fB\-X 32_64\fR] [\fB\-\-help\fR] [\fIobjfile\fR...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1GNU\s0 \fBnm\fR lists the symbols from object files \fIobjfile\fR.... If no object files are listed as arguments, \fBnm\fR assumes the file \&\fIa.out\fR. .PP For each symbol, \fBnm\fR shows: .IP "\(bu" 4 The symbol value, in the radix selected by options (see below), or hexadecimal by default. .IP "\(bu" 4 The symbol type. At least the following types are used; others are, as well, depending on the object file format. If lowercase, the symbol is local; if uppercase, the symbol is global (external). .RS 4 .ie n .IP """A""" 4 .el .IP "\f(CWA\fR" 4 .IX Item "A" The symbol's value is absolute, and will not be changed by further linking. .ie n .IP """B""" 4 .el .IP "\f(CWB\fR" 4 .IX Item "B" .PD 0 .ie n .IP """b""" 4 .el .IP "\f(CWb\fR" 4 .IX Item "b" .PD The symbol is in the uninitialized data section (known as \s-1BSS\s0). .ie n .IP """C""" 4 .el .IP "\f(CWC\fR" 4 .IX Item "C" The symbol is common. Common symbols are uninitialized data. When linking, multiple common symbols may appear with the same name. If the symbol is defined anywhere, the common symbols are treated as undefined references. .ie n .IP """D""" 4 .el .IP "\f(CWD\fR" 4 .IX Item "D" .PD 0 .ie n .IP """d""" 4 .el .IP "\f(CWd\fR" 4 .IX Item "d" .PD The symbol is in the initialized data section. .ie n .IP """G""" 4 .el .IP "\f(CWG\fR" 4 .IX Item "G" .PD 0 .ie n .IP """g""" 4 .el .IP "\f(CWg\fR" 4 .IX Item "g" .PD The symbol is in an initialized data section for small objects. Some object file formats permit more efficient access to small data objects, such as a global int variable as opposed to a large global array. .ie n .IP """i""" 4 .el .IP "\f(CWi\fR" 4 .IX Item "i" For \s-1PE\s0 format files this indicates that the symbol is in a section specific to the implementation of DLLs. For \s-1ELF\s0 format files this indicates that the symbol is an indirect function. This is a \s-1GNU\s0 extension to the standard set of \s-1ELF\s0 symbol types. It indicates a symbol which if referenced by a relocation does not evaluate to its address, but instead must be invoked at runtime. The runtime execution will then return the value to be used in the relocation. .ie n .IP """N""" 4 .el .IP "\f(CWN\fR" 4 .IX Item "N" The symbol is a debugging symbol. .ie n .IP """p""" 4 .el .IP "\f(CWp\fR" 4 .IX Item "p" The symbols is in a stack unwind section. .ie n .IP """R""" 4 .el .IP "\f(CWR\fR" 4 .IX Item "R" .PD 0 .ie n .IP """r""" 4 .el .IP "\f(CWr\fR" 4 .IX Item "r" .PD The symbol is in a read only data section. .ie n .IP """S""" 4 .el .IP "\f(CWS\fR" 4 .IX Item "S" .PD 0 .ie n .IP """s""" 4 .el .IP "\f(CWs\fR" 4 .IX Item "s" .PD The symbol is in an uninitialized data section for small objects. .ie n .IP """T""" 4 .el .IP "\f(CWT\fR" 4 .IX Item "T" .PD 0 .ie n .IP """t""" 4 .el .IP "\f(CWt\fR" 4 .IX Item "t" .PD The symbol is in the text (code) section. .ie n .IP """U""" 4 .el .IP "\f(CWU\fR" 4 .IX Item "U" The symbol is undefined. .ie n .IP """u""" 4 .el .IP "\f(CWu\fR" 4 .IX Item "u" The symbol is a unique global symbol. This is a \s-1GNU\s0 extension to the standard set of \s-1ELF\s0 symbol bindings. For such a symbol the dynamic linker will make sure that in the entire process there is just one symbol with this name and type in use. .ie n .IP """V""" 4 .el .IP "\f(CWV\fR" 4 .IX Item "V" .PD 0 .ie n .IP """v""" 4 .el .IP "\f(CWv\fR" 4 .IX Item "v" .PD The symbol is a weak object. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the weak symbol becomes zero with no error. On some systems, uppercase indicates that a default value has been specified. .ie n .IP """W""" 4 .el .IP "\f(CWW\fR" 4 .IX Item "W" .PD 0 .ie n .IP """w""" 4 .el .IP "\f(CWw\fR" 4 .IX Item "w" .PD The symbol is a weak symbol that has not been specifically tagged as a weak object symbol. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the symbol is determined in a system-specific manner without error. On some systems, uppercase indicates that a default value has been specified. .ie n .IP """\-""" 4 .el .IP "\f(CW\-\fR" 4 .IX Item "-" The symbol is a stabs symbol in an a.out object file. In this case, the next values printed are the stabs other field, the stabs desc field, and the stab type. Stabs symbols are used to hold debugging information. .ie n .IP """?""" 4 .el .IP "\f(CW?\fR" 4 .IX Item "?" The symbol type is unknown, or object file format specific. .RE .RS 4 .RE .IP "\(bu" 4 The symbol name. .SH "OPTIONS" .IX Header "OPTIONS" The long and short forms of options, shown here as alternatives, are equivalent. .IP "\fB\-A\fR" 4 .IX Item "-A" .PD 0 .IP "\fB\-o\fR" 4 .IX Item "-o" .IP "\fB\-\-print\-file\-name\fR" 4 .IX Item "--print-file-name" .PD Precede each symbol by the name of the input file (or archive member) in which it was found, rather than identifying the input file once only, before all of its symbols. .IP "\fB\-a\fR" 4 .IX Item "-a" .PD 0 .IP "\fB\-\-debug\-syms\fR" 4 .IX Item "--debug-syms" .PD Display all symbols, even debugger-only symbols; normally these are not listed. .IP "\fB\-B\fR" 4 .IX Item "-B" The same as \fB\-\-format=bsd\fR (for compatibility with the \s-1MIPS\s0 \fBnm\fR). .IP "\fB\-C\fR" 4 .IX Item "-C" .PD 0 .IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4 .IX Item "--demangle[=style]" .PD Decode (\fIdemangle\fR) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this makes \*(C+ function names readable. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler. .IP "\fB\-\-no\-demangle\fR" 4 .IX Item "--no-demangle" Do not demangle low-level symbol names. This is the default. .IP "\fB\-D\fR" 4 .IX Item "-D" .PD 0 .IP "\fB\-\-dynamic\fR" 4 .IX Item "--dynamic" .PD Display the dynamic symbols rather than the normal symbols. This is only meaningful for dynamic objects, such as certain types of shared libraries. .IP "\fB\-f\fR \fIformat\fR" 4 .IX Item "-f format" .PD 0 .IP "\fB\-\-format=\fR\fIformat\fR" 4 .IX Item "--format=format" .PD Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR, \&\f(CW\*(C`sysv\*(C'\fR, or \f(CW\*(C`posix\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR. Only the first character of \fIformat\fR is significant; it can be either upper or lower case. .IP "\fB\-g\fR" 4 .IX Item "-g" .PD 0 .IP "\fB\-\-extern\-only\fR" 4 .IX Item "--extern-only" .PD Display only external symbols. .IP "\fB\-\-plugin\fR \fIname\fR" 4 .IX Item "--plugin name" Load the plugin called \fIname\fR to add support for extra target types. This option is only available if the toolchain has been built with plugin support enabled. .IP "\fB\-l\fR" 4 .IX Item "-l" .PD 0 .IP "\fB\-\-line\-numbers\fR" 4 .IX Item "--line-numbers" .PD For each symbol, use debugging information to try to find a filename and line number. For a defined symbol, look for the line number of the address of the symbol. For an undefined symbol, look for the line number of a relocation entry which refers to the symbol. If line number information can be found, print it after the other symbol informationµÔ¶Ô·Ô¸Ô¹Ô. .IP "\fB\-n\fR" 4 .IX Item "-n" .PD 0 .IP "\fB\-v\fR" 4 .IX Item "-v" .IP "\fB\-\-numeric\-sort\fR" 4 .IX Item "--numeric-sort" .PD Sort symbols numerically by their addresses, rather than alphabetically by their names. .IP "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-no\-sort\fR" 4 .IX Item "--no-sort" .PD Do not bother to sort the symbols in any order; print them in the order encountered. .IP "\fB\-P\fR" 4 .IX Item "-P" .PD 0 .IP "\fB\-\-portability\fR" 4 .IX Item "--portability" .PD Use the \s-1POSIX\s0.2 standard output format instead of the default format. Equivalent to \fB\-f posix\fR. .IP "\fB\-S\fR" 4 .IX Item "-S" .PD 0 .IP "\fB\-\-print\-size\fR" 4 .IX Item "--print-size" .PD Print both value and size of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output style. This option has no effect for object formats that do not record symbol sizes, unless \fB\-\-size\-sort\fR is also used in which case a calculated size is displayed. .IP "\fB\-s\fR" 4 .IX Item "-s" .PD 0 .IP "\fB\-\-print\-armap\fR" 4 .IX Item "--print-armap" .PD When listing symbols from archive members, include the index: a mapping (stored in the archive by \fBar\fR or \fBranlib\fR) of which modules contain definitions for which names. .IP "\fB\-r\fR" 4 .IX Item "-r" .PD 0 .IP "\fB\-\-reverse\-sort\fR" 4 .IX Item "--reverse-sort" .PD Reverse the order of the sort (whether numeric or alphabetic); let the last come first. .IP "\fB\-\-size\-sort\fR" 4 .IX Item "--size-sort" Sort symbols by size. The size is computed as the difference between the value of the symbol and the value of the symbol with the next higher value. If the \f(CW\*(C`bsd\*(C'\fR output format is used the size of the symbol is printed, rather than the value, and \fB\-S\fR must be used in order both size and value to be printed. .IP "\fB\-\-special\-syms\fR" 4 .IX Item "--special-syms" Display symbols which have a target-specific special meaning. These symbols are usually used by the target for some special processing and are not normally helpful when included included in the normal symbol lists. For example for \s-1ARM\s0 targets this option would skip the mapping symbols used to mark transitions between \s-1ARM\s0 code, \s-1THUMB\s0 code and data. .IP "\fB\-t\fR \fIradix\fR" 4 .IX Item "-t radix" .PD 0 .IP "\fB\-\-radix=\fR\fIradix\fR" 4 .IX Item "--radix=radix" .PD Use \fIradix\fR as the radix for printing the symbol values. It must be \&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal. .IP "\fB\-\-target=\fR\fIbfdname\fR" 4 .IX Item "--target=bfdname" Specify an object code format other than your system's default format. .IP "\fB\-u\fR" 4 .IX Item "-u" .PD 0 .IP "\fB\-\-undefined\-only\fR" 4 .IX Item "--undefined-only" .PD Display only undefined symbols (those external to each object file). .IP "\fB\-\-defined\-only\fR" 4 .IX Item "--defined-only" Display only defined symbols for each object file. .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Show the version number of \fBnm\fR and exit. .IP "\fB\-X\fR" 4 .IX Item "-X" This option is ignored for compatibility with the \s-1AIX\s0 version of \&\fBnm\fR. It takes one parameter which must be the string \&\fB32_64\fR. The default mode of \s-1AIX\s0 \fBnm\fR corresponds to \fB\-X 32\fR, which is not supported by \s-1GNU\s0 \fBnm\fR. .IP "\fB\-\-help\fR" 4 .IX Item "--help" Show a summary of the options to \fBnm\fR and exit. .IP "\fB@\fR\fIfile\fR" 4 .IX Item "@file" Read command-line options from \fIfile\fR. The options read are inserted in place of the original @\fIfile\fR option. If \fIfile\fR does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in \fIfile\fR are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The \fIfile\fR may itself contain additional @\fIfile\fR options; any such options will be processed recursively. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "RANLIB 1" .TH RANLIB 1 "2010-12-08" "binutils-2.21" "GNU Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ranlib \- generate index to archive. .SH "SYNOPSIS" .IX Header "SYNOPSIS" ranlib [\fB\-vVt\fR] \fIarchive\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBranlib\fR generates an index to the contents of an archive and stores it in the archive. The index lists each symbol defined by a member of an archive that is a relocatable object file. .PP You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index. .PP An archive with such an index speeds up linking to the library and allows routines in the library to call each other without regard to their placement in the archive. .PP The \s-1GNU\s0 \fBranlib\fR program is another form of \s-1GNU\s0 \fBar\fR; running \&\fBranlib\fR is completely equivalent to executing \fBar \-s\fR. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-V\fR" 4 .IX Item "-V" .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Show the version number of \fBranlib\fR. .IP "\fB\-t\fR" 4 .IX Item "-t" Update the timestamp of the symbol map of an archive. .IP "\fB@\fR\fIfile\fR" 4 .IX Item "@file" Read command-line options from \fIfile\fR. The options read are inserted in place of the original @\fIfile\fR option. If \fIfile\fR does not exist, or cannot be read, then the option will be treated literally, and not removed. .Sp Options in \fIfile\fR are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The \fIfile\fR may itself contain additional @\fIfile\fR options; any such options will be processed recursively. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIar\fR\|(1), \fInm\fR\|(1), and the Info entries for \fIbinutils\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Tex