problem about mach-o-Collection of common programming errors
Karthik
operating-system dylib libc mach-o
I am trying to override some libc functions (eg:- puts()) with my own implementation. I have defined my own implementation in a dylib file as follows.int puts ( const char * str ); When I link my binary with the dylib file in Xcode and build, my overridden version gets called. However, when I inject the dylib into my binary, I see that the overridden version is not called. I have verified that the dylib is getting loaded by logging something in the entry point of the dylib.Can someone here point
Steve
objective-c objective-c-runtime mach-o
This guy came up with a pretty neat tool to generate a class dependency graph – however, it relies on parsing your source code and looking for #import directives. http://seriot.ch/blog.php?article=20110124 https://github.com/nst/objc_dep/blob/master/objc-dep.pyThis is neat, but I have a number of problems with this. Not least of which is it doesn’t take into account imports of imports nor prefix headers nor whether-or-not the class(es) in the file referenced by the import are actually being used
gigasai
ios gdb arm jailbreak mach-o
I statically compiled JavaScriptCore source in debug mode given at opensource.apple.com for iOS. Purpose is to examine an App that uses JavaScriptCore at runtime. I have no source for the App I’m examining on a jailbroken device.As such I’m thinking of attaching LLDB/GDB to the app at runtime and load the line number and extensive symbol information from the JavascriptCore.a file we compiled.I tried using (gdb) add-symbol-file /path/to/libJavaScriptCore.a <address-of-library-loaded-in-mem>
Moshe
objective-c mach-o
In the DATA segment of a Mach-O binary, there are a few objective-C specific sections (mentioned on page 7 of the Mach-O file format)To quote the PiOS paper:the __objc_classlist section contains a list of all classes whoseimplementation is present in the analyzed binary (that is, all classesimplemented by the developer or included by the static linker)andThe __objc_classref section, on the other hand, contains references toall classes that are used by the application. The implementations ofthese
lucapette
osx assembly mach-o
Is there any way to get raw binary output from “as” command in max os x? When I assemble some simple assembly file it outputs Mach-O object file with its headers and some symbol information. I want only the code part of the file.If it does’t have any useful commands or command options, is there any easy way(command) to extract a specified segment from Mach-O file?
Maddy In
osx mach-o
I need to change reference of a function in a Mac OS process at runtime to a custom function defined in my own custom dylib. I kept the new function signature same as the original. For example I need to change “open” function to “myopen” function.I tried processing __LINKEDIT segment to get the dynamic symbol table and string table. I used following pointers, 1. the VMAddrress from __LINKEDIT segment, 2. mach_header and vmaddr_slide from the “_dyld_register_func_for_add_image” callback, 3. symof
Henning Makholm
ios linker mach-o dead-code
What is the easiest way to produce a Mach-O object file that does not have the SUBSECTIONS_VIA_SYMBOLS flag set, such that the linker (with -dead_strip) will not later try to cut the text section into pieces and guess which pieces are used?I can use either a command-line option to llvm/gcc (4.2.1) that will prevent it from emitting .subsections_via_symbols in the first place, or a command-line tool that will remove the flag from an existing object file.(Writing such a tool myself based on the Ma
user3103821
selector modify mach-o
I want modify the selector string in the macho-o’s __objc_sel section.So if the hacker use the class-dump or IDA pro to get the function list,they will get the wrong or mixed method names. But after my modification,the binary will crash,and raise “the selector can not be found exception”. Could someone tell me if i could do it in this way.if does,how?
Locksleyu
osx mach-o dyld
Does anyone know what the format of the data pointed to by the Mach-O LC_FUNCTION_STARTS command is?The most information I could find is in the loader.h header file:#define LC_FUNCTION_STARTS 0x26 /* compressed table of function start addresses */I see the dyldinfo tool has a -function_starts option which analyzes this data and the tool is open source, but the latest released version of the tool doesn’t contain the support:http://opensource.apple.com/source/ld64/ld64-97.2/src/other/dyldinfo.cppD
jfenwick
linker dynamic-linking dylib mach-o install-name-tool
I know that I can use the -change option of install_name_tool to change the name of a dependent shared library stored in a dylib, but is there a way to remove a dependent shared library, which I believe is a LC_LOAD_DYLIB command, so it won’t show up when I run otool -L on the dylib?
Brian515
xcode xcode4 mach-o
I’m trying to use PDColoredProgressView from here. It was working, but for some reason, XCode decided it wasn’t having it and throws up 27 Apple Mach-O Linker (Id) Errors. Huh? Can anyone decode this? Thanks!Ld /Users/xxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxx-cqamvgtgfzdealbjtkomtjzxkdgr/Build/Intermediates/xxxxxxx.build/Debug-iphoneos/xxxxx.build/Objects-normal/armv6/xxxxx normal armv6cd “/Users/xxxxxxx/Documents/iPhone Apps/xxxxx”setenv IPHONEOS_DEPLOYMENT_TARGET 4.0setenv PATH “/Deve
user2467831
xcode opencv linker mach-o dynamic-library
Ok. So here goes. I am currently trying to add and use a dynamic library called OpenCV into a Xcode project of mine. I first installed MacPorts using the .pkg. Then I opened Terminal and ran “sudo port install opencv”. MacPorts then installed all sorts of dependencies (FFMPEG/etc) and then installed OpenCV into the “/opt/local/lib” folder for the .dylib files and into “/opt/local/include” folder for the header files. Then I opened Xcode and opened command line utility application project. I adde
user1639164
ios xcode facebook linker-error mach-o
I installed the Facebook SDK and followed one of their tutorials in order to provide some very basic FB functionality to my app. The app, and the FB integration seems to work just fine so I think I did a decent job with the tutorial. When I attempt to Archive the project so that I can throw a build up on TestFlight, I get a Failure due to 15 linker errors, that looks like the below text (I copied it from the app log). It seems to be related to lsqlite3.0, which the FB tute said to add to the b
user1516038
opencv xcode4 linker mach-o
I have an older system (OSX 10.6.8 with xcode 4.0) and I’m trying to get OpenCV 2.3.0 to work on it. The problem that I can’t resolve is that whenever I try to use the flann library, my xcode gives me a Mach-O linker error. So far I’ve tried recompiling the all the libraries and building the dylib from a different source, but it hasn’t helped. When I check the library in terminal, i get Freddi-2:OpenCV-2.3.0 fredchen$ file /usr/local/lib/libopencv_flann.dylib /usr/local/lib/libopencv_flann.dylib
Johannes Weiß
osx shared-libraries mach-o dyld
I need to find the offset of a local symbol in a shared library on OS X. Local symbol as in non-exported symbol. Therefore dyld(“symbol_name”) will not work.I can however use nm to find these offsets, for example$ nm /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/DesktopServicesPriv | grep -e ChildSetLabel -e NodeVolumeEject 000000000006cccd T _NodeVolumeEject 000000000009dbd7 t __ChildSetLabelThere we see the exported (T) symbol NodeVolumeEject which’s offset 0x6cccd I can eas
Terrel Gibson
objective-c xcode class linker mach-o
Hi I am creating a dynamic Table View and am trying to upload the information from methods stored in other files. When I try to test if I am getting the information I get the Macho Linker Error Undefined symbols for architecture i386:”_OBJC_CLASS_$_FlickrFetcher”, referenced from:objc-class-ref in MyTableViewController.o ld: symbol(s) not found for architecture i386Here is my code that I added that resulted in the problem. FlickerFetcher.h This has the methods which my tableViewController calls
Twan van Eijk
iphone xcode apple linker-error mach-o
I have been working on an app to upload photo images from an iPhone to a web server for internship, but every time I try to run the app, I get a Mach-O Linker Error. I have tried everything I found on this site (recreating the app, add libz.dylib, add QuartzCore.Framework), but the errors still remain. Anyone know what’s wrong with the code?ErrorUndefined symbols for architecture x86_64:<br> “_compress”, referenced from:<br>-[Uploader(Private) compress:] in AppDelegate.o<br> ld
cory ginsberg
objective-c uiviewcontroller linker-error mach-o
I found this Color Picker online and I am currently trying to implement it into my code. I followed all the instructions to implement it but when I try to load the ViewController that came with the code (using a UITableView cell), I get an Apple Mach-o Linker Error when I try to build and/or run the code saying:Undefined symbols for architecture armv7:”_OBJC_CLASS_$_ColorPickerViewController”, referenced from:objc-class-ref in ClockSettingsViewController.old: symbol(s) not found for architectur
jokerdc
ios afnetworking linker-error mach-o
Just adding AFNetworking into my project, and after B&R here i got this error like:Undefined symbols for architecture i386: “_SecCertificateCopyData”, referenced from:-[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o “_SecCertificateCreateWithData”, referenced from:___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o “_SecPolicyCreateBasicX509”, referenced from:___44+[AFURLConnectionO
DAS
ios xcode frameworks mach-o
Got this error:Undefined symbols for architecture i386: “_drawGlossAndGradient”, referenced from:-[CustomHeader drawRect:] in CustomHeader.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)With this code:drawGlossAndGradient(context, _coloredBoxRect, lightColor, darkColor);A similar error happens with this bit of code:CGMutablePathRef arcPath = createArcPathFromBottomOfRect(arcRect, 4.0);I imported some .h and .m files
karlphillip
opencv apple mach-o
The following is the detailed error message I got while compiling a OpenCV project. Please help me out. Thanks a lot!Undefined symbols for architecture x86_64:”_cvFindFundamentalMat”, referenced from:testRigidRegistrationCode() in AugmentedReality.oCamEgoMotion::step6_computeEssentialMatrix(CvMat*, CvMat*, bool*) in CameraEgomotion.o”_cvComputeCorrespondEpilines”, referenced from:CamEgoMotion::step6_computeEssentialMatrix(CvMat*, CvMat*, bool*) in CameraEgomotion.o ld: symbol(s) not found for ar
bdash
linker apple mach-o
I have no errors until I build then I get 3 Mach-O Linker errorsUndefined symbols for architecture armv7:”NotifyAutoOrientationChange()”, referenced from:ScreenManager::SetIsOrientationEnabled(EnabledOrientation, bool) in libiPhone-lib.a(ScreenManager.o)”Register_UnityEngine_Mesh_INTERNAL_CALL_Clear()”, referenced from:RegisterAllStrippedInternalCalls() in RegisterMonoModules.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invo
Siddharthan Asokan
ios xcode compiler-errors mach-o
I have an error at compile time. Seems to be weird. it worked as detail view application but using single view doesn’t seem to work. this is the error details Undefined symbols for architecture i386:”_OBJC_CLASS_$_RssArticle”, referenced from:objc-class-ref in RssXmlParser.old: symbol(s) not found for architecture i386clang: error: linker command failed with exit code 1 (use -v to see invocation)
Rob
objective-c linker ios4 asihttprequest mach-o
I know this type of error has been raised many times before, but I have not found solution of my error. I am using xcode 4.0. I downloaded ASIHTTPRequest zip and copied classes folder along with two files of ‘Reachability”. After compilation, it is giving me strange errors which I can’t figure out. Below I copied text of error for undefined symbols for architecture i386.Ld /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesi
Locksleyu
ios binary legacy mach-o
I have a IPA file whose main binary contains a 0x29 load command, which is specified in an older version of loader.h as “LC_DATA_IN_CODE”.However when I try to do anything with the file (including using otool or codesign) I get error messages about “unknown load command”.I am going to talk to the person who gave me the IPA file, but before that I wanted to get some history for this command. Is it no longer supported and if so what version did it leave? Or was it re-added to a recent version of t
Web site is in building