Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!orcenl!bengsig From: bengsig@dk.oracle.com (Bjorn Engsig) Newsgroups: comp.unix.aix Subject: Re: bind getting stuck? Message-ID: <1255@dkunix9.dk.oracle.com> Date: 18 Feb 91 08:09:18 GMT References: <1991Feb15.190657.47304@uvmark.uucp> Reply-To: bengsig@dk.oracle.com (Bjorn Engsig) Organization: Oracle Denmark Lines: 30 Article <1991Feb15.190657.47304@uvmark.uucp> by irwin@uvmark.uucp (Frank Irwin) says: |I'm trying to make ld bind shared object files into the output object, so Well, the binder is a tricky one to use when you step just a bit aside of it's normal use. And unfortunately the documentation doesn't help you very much. |that all system calls will use our malloc() instead of the system malloc(). Since libc.a is not much more that one big shared object (ever did ar tv on it?) you would expect that you cannot replace a module by another one. Also, and this is important, this is definately not according to ANSI C. If you don't want malloc(), use your_malloc() in stead. | |To do this, I use the -bnoautoimp -berok -bnogc options to ld. However, |bind never seems to complete. It is sometimes very time consuming, in particular if you are low on real memory. If you are (also) low on paging you'll get killed by signal 9. | |Could not load program genro |Error was: Exec format error Some of the options to the linker are only supposed to be used when IBM is linking the aix kernel. | |Any ideas would be greatly appreciated. The best one is to use your_malloc() all over your code. That's guaranteed to work; but it does of course need to call malloc() eventually to get the memory, or you could try to implement it using shared memory calls, which is also hard since there is no brk() equivalent on shared memory. -- Bjorn Engsig, ORACLE Corporation, E-mail: bengsig@oracle.com, bengsig@oracle.nl "Stepping in others footsteps, doesn't bring you ahead"