Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Peter Kocks
Mon, 13 Apr 1992 16:12
How do you ld code in mach so that the stdlib is overwritten?
Author: Peter Kocks
Date: Mon, 13 Apr 1992 16:12
Date: Mon, 13 Apr 1992 16:12
30 lines
1792 bytes
1792 bytes
Hi, I'm try to port some malloc debugging tools for unix to NeXT/MACH (recently posted to comp.sources.reviewed). This may be futile, but I'm trying anyway. The programs compile fine, but when I try to link I always get messages like "malloc defined twice...exit". On the NeXT there already is a MallocDebug library which is used to override the libsys_s.a version of malloc. You simply add -lMallocDebug to your command line and everything works fine. I looked into the NeXT MallocDebug library and discovered it was not a standard archive. This leads me to conclude that they did not use the standard "ar" "ranlib" when compling there library. So, how do you do it? How do you make a library of object code such that when loaded first, all subsequent loads of objects of the same thing are ignored? In unix this seems simple, in MACH not. Please respond by e-mail --Peter Kocks kocks@chemsitry.stanford.edu P.S. Incidently, the reason I am not using the NeXT provided MallocDebug library is that it does not work as well as I would like with gdb. I'm not programming NeXT applications so the MallocDebug application is not the answer either. The code I have seems like it will do a lot and I will post if it works.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads