{"id":793,"date":"2022-08-30T15:07:16","date_gmt":"2022-08-30T15:07:16","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/problem-about-nm-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:07:16","modified_gmt":"2022-08-30T15:07:16","slug":"problem-about-nm-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-nm-collection-of-common-programming-errors\/","title":{"rendered":"problem about nm-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b1d103dddc0973edf0475605c91dc5ea?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nprabhu<br \/>\nsegmentation-fault undefined-symbol nm<br \/>\nI am having troubles in executing the binary. the program is receiving segmentation fault. The filtering is the out put of gdbgdb a.out(gdb) run Starting program: a.outProgram received signal SIGSEGV, Segmentation fault. 0x00000001 in ?? () (gdb)Then i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6836267883ea7234253b2100f222dbbc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nosgx<br \/>\nlinux shared-libraries binutils nm<br \/>\nI want to find some external symbols, used by one shared library (.so) in another. I easily can runnm -D .\/lib_the_one.soand get list of used symbols by grepping, for exam<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1c75ce98a8ca34c0c557167bb1626e46?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAbinash Bishoyi<br \/>\nunix shared-libraries icu solaris-10 nm<br \/>\nI am getting the following output for the nm \u2013u for a ICU library. Does it mean this library is corrupted? While using this library some of our code take 20 mins to complete the execution. I&#8217;m suspecting it is because of this library is corrupted but I&#8217;m not sure about<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/18431ffe70f2e333b8d29d7664171ac4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ncheshirekow<br \/>\nios symbols undefined-symbol nm<br \/>\nI&#8217;m having some problems with my iPhone app not linking for the iPhone Simulator. It tells me there are undefined symbols: Undefined symbols for architecture i386:&#8221;.objc_class_name_NSRunLoop&#8221;, referenced from:pointer-to-literal-objc-class-name in SampleBrowser.cpp.o&#8221;.objc_class_name_NSDate&#8221;, referenced from:pointer-to-literal-objc-class-name in SampleBrowser.cpp.o&#8221;.objc_class_name_NSAutoreleasePool&#8221;, referenced from:pointer-to-literal-objc-class-name in SampleBrowser.cpp.opointer-to-literal-objc-class-name in libRenderSystem_GLES2Static.a(OgreEAGL2Window.mm.o)&#8221;.objc_class_name_UIApplication&#8221;, referenced from:pointer-to-literal-objc-class-name in SampleBrowser.cpp.opointer-to-literal-objc-class-name in libOIS.a(iPhoneInputManager.mm.o)&#8221;.objc_class_name_NSObject&#8221;, referenced from:.objc_class_name_AppDelegate in SampleBrowser.cpp.o&#8221;.objc_class_name_UIView&#8221;, referenced from:.objc_class_name_SampleBrowserGestureView in SampleBrowser.cpp.o.objc_class_name_InputDelegate in libOIS.a(iPhoneInputManager.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/68fdf71a1519554403013964f2d4380e?s=128&amp;d=identicon&amp;r=PG\" \/><br \/>\ncoelhudo<br \/>\nmicrosoft symbols nm<br \/>\nI&#8217;ve long used cygwin&#8217;s nm command for all my .lib symbol debugging needs, but recently I thought abou<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4d4fbbf7cbb15f7076a5bc273f7fa039?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohannes Wei\u00df<br \/>\nc unix gcc linker nm<br \/>\nI have a linking error which I&#8217;m supposed to fix using the nm command on Unix.If I have the following linking error: undefined reference to &#8216;program<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/490ffb63b0a1e3deb6b54f25896a9a93?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlex Hoppus<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/47b65bea8f56a91f000481ab7bc5f9f9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlbrecht<br \/>\nc static-libraries symbol nm<br \/>\nnm command report a symbol to be both U an<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9ce3f0c53d4868de52995c9d1191ce91?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2187526<br \/>\nandroid c++ android-ndk ld nm<br \/>\nEDITED: solution at the end of the post.I am building a shared library for android using NDK r8d, using the sample project hello-jni from the NDK, and some static libraries compiled with the ARM standalone toolchain.NDK-BUILD complains about undefined reference. See the linker command and its output:c:\/android\/ndk\/toolchains\/arm-linux-androideabi-4.6\/prebuilt\/windows\/bin\/arm-linux- androideabi-g++ -Wl,-soname,libhello-jni.so -shared &#8211;sysroot=c:\/android\/ndk\/platforms \/android-9\/arch-arm .\/obj\/local\/armeabi\/objs-debug\/hello-jni\/hello-jni.o .\/obj\/local \/armeabi\/libDataProvider.a .\/obj\/local\/armeabi\/libPDF.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e8a8829c6307128222889a7ca98356e1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nbshirley<br \/>\nc ios linker undefined-symbol nm<br \/>\nI recently ran nm -m -p -g on the System.B.dylib library from the iOS SDK4.3 and was surprised to find a lot of symbols marked (undefined) (extern<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/807b9078b6daa9c0f96a79c61104ad98?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPhoenixX_2<br \/>\ngcc linker static-libraries nm<br \/>\nAt linking time, I&#8217;m getting the following:libMain.a(Object.o): In function `Object&#8217;: Object.cpp(44): undefined reference to `Transform<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d0169513b14084f169c7d5126885a6e0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nteppic<br \/>\nc linux icc nm<br \/>\nI am linking an external library (via wierd process, mpicc + Cython + etc), but I have a weird behaviour of a linking procedure.There are two .o files, libpetsc4py.o and PETSc.o they are linked into a .so file PETSc.soOne contains an undefined symbol __pyx_tp_new_8petsc4py_5PETSc_Object[zheltkov@compiler-2 src]$ nm libpetsc4py.o | grep __pyx_tp_new_8petsc4py_5PETSc_ObjectU __pyx_tp_new_8petsc4py_5PETSc_ObjectIt is defined in another .o file:[zheltkov@compiler-2 src]$ nm PETSc.o | grep __pyx_tp_new_8petsc4py_5PETSc_Object 00000000001b92f0 t __pyx_tp_new_8petsc4py_5PETSc_ObjectThen, then linking is done (the compile line is weird, sorry)mp<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:45:51. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>prabhu segmentation-fault undefined-symbol nm I am having troubles in executing the binary. the program is receiving segmentation fault. The filtering is the out put of gdbgdb a.out(gdb) run Starting program: a.outProgram received signal SIGSEGV, Segmentation fault. 0x00000001 in ?? () (gdb)Then i osgx linux shared-libraries binutils nm I want to find some external symbols, used [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-793","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/793\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}