nm and mlton executables

Stephen Weeks MLton@sourcelight.com
Wed, 16 Aug 2000 22:06:43 -0700 (PDT)


I am confused why if I do nm of a mlton generated executable, there are a whole
bunch of labels for functions that are clearly not used.  For an example, see
below.  How can I find out if the code for these functions is really there?

mlprof% nm -n tak
         U __deregister_frame_info@@GLIBC_2.0
         U __libc_start_main@@GLIBC_2.0
         U __monstartup@@GLIBC_2.0
         U __register_frame_info@@GLIBC_2.0
         U _fp_hw
         U _mcleanup@@GLIBC_2.0
         U abort@@GLIBC_2.0
         U accept@@GLIBC_2.0
         U asctime@@GLIBC_2.0
         U atexit@@GLIBC_2.0
         U bind@@GLIBC_2.0
         U connect@@GLIBC_2.0
         U difftime@@GLIBC_2.0
         U exit@@GLIBC_2.0
         U fclose@@GLIBC_2.1
         U fflush@@GLIBC_2.0
         U fgetc@@GLIBC_2.0
         U fgets@@GLIBC_2.0
         U fopen@@GLIBC_2.1
         U fprintf@@GLIBC_2.0
         U fputc@@GLIBC_2.0
         U fread@@GLIBC_2.0
         U fwrite@@GLIBC_2.0
         U gethostbyaddr@@GLIBC_2.0
         U gethostbyname@@GLIBC_2.0
         U getpagesize@@GLIBC_2.0
         U getrusage@@GLIBC_2.0
         U getsockname@@GLIBC_2.0
         U gettimeofday@@GLIBC_2.0
         U gmtime@@GLIBC_2.0
         U listen@@GLIBC_2.0
         U localtime@@GLIBC_2.0
         U memcpy@@GLIBC_2.0
         U memmove@@GLIBC_2.0
         U mktime@@GLIBC_2.0
         U mmap@@GLIBC_2.0
         U mprotect@@GLIBC_2.0
         U munmap@@GLIBC_2.0
         U ptrace@@GLIBC_2.0
         U setitimer@@GLIBC_2.0
         U setsockopt@@GLIBC_2.0
         U sigaddset@@GLIBC_2.0
         U sigaltstack@@GLIBC_2.0
         U sigemptyset@@GLIBC_2.0
         U sigprocmask@@GLIBC_2.0
         U socket@@GLIBC_2.0
         U sprintf@@GLIBC_2.0
         U strftime@@GLIBC_2.0
         U time@@GLIBC_2.0
         U tmpnam@@GLIBC_2.0
         U vfprintf@@GLIBC_2.0
08048ba8 ? _init
08048f20 T _start
08048f44 T __gmon_start__
08048f74 t gcc2_compiled.
08048f80 t __do_global_dtors_aux
08048f80 t gcc2_compiled.
08048fc8 t fini_dummy
08048fd0 t frame_dummy
08048ff0 t init_dummy
08048ff8 t saveGlobals
08049054 t loadGlobals
080490b0 t float_Init
080490b4 t Chunk2
08049108 t Chunk1
0804933c T main
08049420 t gcc2_compiled.
08049420 t smmap
08049454 t smunmap
0804947c t ssmmap
080494e0 t roundPage
0804950c t display
08049558 t ensureFree
08049578 t object
08049598 T getFrameLayout
08049604 t stackBytes
0804961c t stackBottom
08049628 t stackTop
08049640 t stackLimit
0804966c t currentStackUsed
08049684 t topFrameSize
080496a4 t stackTopIsOk
080496e0 t newStack
08049710 t setStack
08049744 t stackCopy
08049778 t threadBytes
08049784 t initialThreadBytes
080497ac t newThreadOfSize
080497fc t switchToThread
08049810 t copyThread
08049848 T GC_copyThreadShrink
08049874 T stackNeedsReserved
080498a0 T GC_copyThread
080498d0 t fromSpace
08049904 t toSpace
0804992c t currentTime
080499a4 t computeHeapSize
080499f4 t foreachGlobal
08049a68 t foreachPointerInObject
08049c08 t foreachPointerInRange
08049c50 t initCounters
08049d40 t initHashFrameIndex
08049e80 t initSignalStack
08049ecc t getRAMsize
08049f6c t setHeapParams
08049fec T GC_init
0804a088 t forward
0804a1dc t doGC
0804a548 T GC_gc
0804a65c T GC_createStrings
0804a73c t displayUint
0804a764 t displayUllong
0804a790 T GC_done
0804a8cc T GC_saveWorld
0804a998 t translatePointer
0804a9c0 t translateHeap
0804aa1c T GC_loadWorld
0804ab84 t blockSignals
0804ab9c t unblockSignals
0804abb4 t enter
0804abf8 t leave
0804ac20 T GC_handler
0804ac4c T GC_finishHandler
0804ac88 t dfsInitializeStack
0804acd8 t dfsSize
0804adec t unmarkDeep
0804ae50 T GC_size
0804ae8c t dfsPushIfMarked
0804aebc t dfsPushIfUnmarked
0804aef0 T MLton_bug
0804aef0 t gcc2_compiled.
0804af14 T MLton_usage
0804af28 t stringToBytes
0804af84 T MLton_init
0804b328 T MLton_printStringEscaped
0804b3e8 T MLton_exit
0804b400 T C_CS_sub
0804b410 T C_CS_update
0804b424 T C_CSS_sub
0804b434 T CommandLine_argc
0804b440 T CommandLine_argv
0804b44c T CommandLine_commandName
0804b458 T Date_Tm_sec
0804b464 T Date_Tm_min
0804b474 T Date_Tm_hour
0804b484 T Date_Tm_mday
0804b494 T Date_Tm_mon
0804b4a4 T Date_Tm_year
0804b4b4 T Date_Tm_wday
0804b4c4 T Date_Tm_yday
0804b4d4 T Date_Tm_isdst
0804b4e4 T Date_Tm_setSec
0804b4f4 T Date_Tm_setMin
0804b504 T Date_Tm_setHour
0804b514 T Date_Tm_setMday
0804b524 T Date_Tm_setMon
0804b534 T Date_Tm_setYear
0804b544 T Date_Tm_setWday
0804b554 T Date_Tm_setYday
0804b564 T Date_Tm_setIsdst
0804b574 T Date_asctime
0804b584 T Date_gmtime
0804b598 T Date_localoffset
0804b5dc T Date_localtime
0804b5f0 T Date_mktime
0804b600 T Date_strftime
0804b618 t spaces
0804b664 T Debug_enter
0804b6a8 T Debug_leave
0804b6ec T GC_setMessages
0804b6fc T GC_setSummary
0804b70c T IEEEReal_setRoundingMode
0804b730 T IEEEReal_getRoundingMode
0804b750 T MLton_overflow
0804b760 T Int_addCheck
0804b770 T Int_subCheck
0804b780 T Int_mulCheck
0804b790 T Int_quot
0804b79c T Int_rem
0804b7ac T Itimer_set
0804b7e0 T MLton_random
0804b810 T MLton_size
0804b824 T OS_FileSys_tmpnam
0804b830 T Ptrace_ptrace2
0804b844 T Ptrace_ptrace4
0804b85c T Real_signBit
0804b86c T Real_class
0804b8dc T Real_isFinite
0804b8f8 T Real_isNan
0804b92c T Real_isNormal
0804b950 T Real_round
0804b95c T Socket_connect
0804b9ec T Socket_listen
0804ba88 T Socket_Host_name
0804ba94 T Socket_Host_getByAddress
0804bad0 T Socket_Host_getByName
0804baf4 T Socket_Addr_address
0804bb0c T Socket_Addr_port
0804bb20 T Socket_accept
0804bb78 T Stdio_print
0804bb94 T Stdio_sprintf
0804bbac T String_equal
0804bbec T Thread_atomicBegin
0804bbf8 T Thread_atomicEnd
0804bc04 T Thread_current
0804bc10 T Thread_saved
0804bc24 T Thread_setHandler
0804bc34 T Time_gettimeofday
0804bc48 T Time_sec
0804bc54 T Time_usec
0804bc60 T Word8_arshiftAsm
0804bc78 T Word32_arshiftAsm
0804bc90 T die
0804bc90 t gcc2_compiled.
0804bccc T asfail
0804bd00 T sopen
0804bd2c T swrite
0804bd5c T swriteUint
0804bd74 T sread
0804bda4 T sreadUint
0804bdc0 T intToCommaString
0804be90 T uintToCommaString
0804bf0c T ullongToCommaString
0804bf90 T __udivdi3
0804c0d0 T __umoddi3
0804c270 t __do_global_ctors_aux
0804c270 t gcc2_compiled.
0804c294 t init_dummy
0804c29c A _etext
0804c29c ? _fini
0804c29c A etext
0804c29c t gcc2_compiled.
0804c2c4 R _IO_stdin_used
0804c420 r RAMslop
0804c5f8 r TERMINATOR
0804ca40 r __clz_tab
0804cb40 r __clz_tab
0804dc40 D __data_start
0804dc40 W data_start
0804dc44 d p.2
0804dc48 d completed.3
0804dc4c d force_to_data
0804dc4c d intInfInits
0804dc54 d stringInits
0804dc60 d nextChunks
0804dc88 d frameOffsets0
0804dc8c d frameLayouts
0804dd08 d depth
0804dd10 D Real_Math_pi
0804dd18 D Real_Math_e
0804dd20 ? __EH_FRAME_BEGIN__
0804dd20 ? __FRAME_END__
0804dd20 d force_to_data
0804dd24 ? __CTOR_LIST__
0804dd28 ? __CTOR_END__
0804dd2c ? __DTOR_LIST__
0804dd30 ? __DTOR_END__
0804dd34 ? _GLOBAL_OFFSET_TABLE_
0804de10 ? _DYNAMIC
0804deb8 A __bss_start
0804deb8 A _edata
0804dec0 B __environ@@GLIBC_2.0
0804dec0 W environ@@GLIBC_2.0
0804dec4 B stdout@@GLIBC_2.0
0804dec8 B stderr@@GLIBC_2.0
0804decc b called.28
0804ded0 b object.8
0804dee8 b sizeRes
0804deec b serializeRes
0804def0 b deserializeRes
0804def4 b stackRes
0804def8 b intInfRes
0804defc b nextChunk
0804df00 b nextFun
0804df04 b globaluchar
0804df08 b globaldouble
0804df08 b globalint
0804df08 b globalpointer
0804df08 b globalpointerNonRoot
0804df08 b globaluint
0804df08 b psize.120
0804df0c b altstack.195
0804df20 b tm
0804df4c b tmp
0804df50 b host
0804df54 b sockaddr_in
0804df64 b timeval
0804df80 b buf.58
0804dfe0 b buf.61
0804e040 b buf.64
0804e0a0 B gcState
0804e664 B mltonState
0804e680 B MLton_SxmlUnknown
0804e688 B MLton_CpsCall
0804e690 B MLton_numReturns
0804e698 B MLton_XmlKnown
0804e6a0 B MLton_CpsDispatch
0804e6a8 B MLton_numInterReturns
0804e6b0 B MLton_CpsCoerce
0804e6b8 B MLton_numTrampolines
0804e6c0 B MLton_CpsKnown
0804e6c8 B MLton_XmlUnknown
0804e6d0 B Real_posInf
0804e6d8 B MLton_CpsUnknown
0804e6e0 B MLton_SxmlKnown
0804e6e8 B MLton_numLimitChecks
0804e6f0 B MLton_CpsLoop
0804e6f8 A _end