⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 munch.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/tornado/hutils/munch.html - generated by refgen from munch.sh --> <title> munch </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado Reference :  Tornado Utilities</i></a></p></blockquote><h1>munch</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>munch</strong> - extract initializers and finalizers from C++ object modules</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>wtxtcl $WIND_BASE/host/src/hutils/munch.tcl [-asm <i>arch</i>]</pre><p><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This tool produces data structures used to call constructors anddestructors for static objects. It is used when compiling C++ modules.<p>Given an ordered list of C++ object modules, munch produces a C program containing Ctors/Dtors arrays where the initialization order is the one promised below. <p>The modules should be ordered on the command line so that <b>a.o</b> is tothe left of <b>b.o</b> if any initializers that appear in <b>a.o</b> but in no moduleto the right of <b>a.o</b> should be called before any initializers in <b>b.o</b>. Notice that each initializer is called only once (in its rightmost position) eventhough it may appear in more than one module. Finalizers are run in the reverse order.  <p>If you are using a GNU compiler you should invoke munch withthe -asm flag. This causes munch to output assembly directiveswhich can be compiled without any special flags.On the other hand, if you do not supply the <b>-asm</b> flag thecompiler may have to be coerced into accepting non-standardcharacters in identifiers (such as <b>$</b>). On GNU compilersthis is achieved with the <b>-fdollars-in-identifiers</b> option.<p></blockquote><h4>EXAMPLES</h4><blockquote><p>Consider a project consisting of two C++ modules, <b>user1.o</b> and <b>user2.o</b>,linked with a user library <b>myLib.a</b> and a vxWorks library(say <b>libMC68040gnuvx.a</b>). Then the ctors file can be generatedusing:<p></blockQuote><h4>Windows</h4><blockQuote><pre>nm68k partialImage.o partialUserImage.o user1.o user2.o \      | wtxtcl %WIND_BASE%\host\src\hutils\munch.tcl -asm 68k &gt; ctdt.c</pre></blockQuote><h4>UNIX</h4><blockQuote><pre>nm68k partialImage.o partialUserImage.o user1.o user2.o \      | wtxtcl $WIND_BASE/host/src/hutils/munch.tcl -asm 68k &gt; ctdt.c</pre>Here <b>partialUserImage.o</b> is the result of linking <b>user1.o</b> and <b>user2.o</b> against <b>myLib.a</b> and <b>partialImage.o</b> is the result of linking <b>partialUserImage.o</b> against <b>libMC68040gnuvx.a</b>.<p>This will ensure that the VxWorks library is initialized beforethe user library which in turn is initialized before anyof the project modules. The latter are initialized in theorder they appear on the command line.<p>The following commands will compile "<b>hello.cpp</b>", then munch "<b>hello.o</b>",resulting in the munched file "<b>hello.out</b>", suitable for loading by theTornado module loader:<p></blockQuote><h4>Windows</h4><blockQuote><pre>   cc68k -I%WIND_BASE%\target\h -DCPU=MC68020 -nostdinc -fno-builtin -c hello.cpp   nm68k hello.o | wtxtcl %WIND_BASE%\host\src\hutils\munch.tcl -asm 68k &gt; ctdt.c   cc68k -c ctdt.c   ld68k -r -o hello.out hello.o ctdt.o</pre></blockQuote><h4>UNIX</h4><blockQuote><pre>  cc68k -I$WIND_BASE/target/h -DCPU=MC68020 -nostdinc -fno-builtin -c hello.cpp  nm68k hello.o | wtxtcl $WIND_BASE/host/src/hutils/munch.tcl -asm 68k &gt; ctdt.c  cc68k -c ctdt.c  ld68k -r -o hello.out hello.o ctdt.o</pre> </blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./munch.html#top">munch</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -