On Tue, 26 Dec 2000, Scott Johnson (Bellevue) wrote:
> Magic words: MAP FILE. Look in the linker map file to see what's going on.
> This will tell you if your individual functions all got bigger, or if a lot
> of runtime support code is getting linked, etc. Compare "before" and
> "after" versions of the file to see differences.
I've done C/C++ programming for quite some time, but haven't ever looked
at the contents of a map file in detail...so if someone could walk me
through it a bit, that'd be great. :)
It looks to me like the C++ compiler is adding tons of stuff for both
exception handling, type info, and RTTI -- I compiled without exception
handling, or at least I thought so, and I'm pretty sure the typeinfo stuff
is needed. However, RTTI can be disabled, right?
However, I'm finding it difficult to determine if the code for the
portions I wrote in both C and C++ has gotten bigger -- the memory map
doesn't show exact sizes, and I'm not sure if I can tell accurate size on
a .o-basis just by looking at the .reloc table at the end of the mapfile?
Thanks for the help...an example follows:
I'm seeing large blocks such as the following, which do not show up in the
C code.
.text 0x00002d34 0x50c
/usr/local/lib/gcc-lib/m68k-palmos/2.95.2-kgpd/libgcc.a(exception.o)
0x00003132 exception::what(void) const
0x000031ca bad_exception type_info function
0x00003174 exception type_info function
0x00002e32 __cp_push_exception
0x00002d6e unexpected(void)
0x00002d7a __cp_exception_info
0x00002d4a set_terminate(void (*)(void))
0x00002f16 __uncatch_exception
0x0000320e bad_exception::bad_exception(void)
0x00002d40 __default_unexpected(void)
0x00002f32 __check_eh_spec
0x00003064 __throw_bad_cast
0x000031aa exception::~exception(void)
0x00002d34 terminate(void)
0x00002d5c set_unexpected(void (*)(void))
0x00002d98 __start_cp_handler
0x00002ddc __cplus_type_matcher
0x00002dcc __eh_free
0x00002e8e __cp_pop_exception
0x000030bc __throw_bad_typeid
0x00003198 exception::exception(void)
0x00002d8a __cp_eh_info
0x00003114 uncaught_exception(void)
0x00003220 bad_exception::~bad_exception(void)
0x00002db0 __eh_alloc
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/