www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/21/02:50:43

Date: Fri, 21 Apr 1995 02:02:00 -0300 (ADT)
From: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>
Subject: Re: Multiple references in a link step
To: Dave New <den AT aisinc DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu, ckann AT seas DOT gwu DOT edu


On Thu, 20 Apr 1995, Dave New wrote:

>  
> Usually what happens is that if you replace one function contained in standard
> file with another function in a new file, you must replace all the functions in
> the standard file, or else ensure that none of the other functions are ever 
> referenced by anything else in that link.

This may be a little drastic, and I haven't tried it, but couldn't you do 
this?
1) copy your libc.a file to a "safe" directory for later (when everything 
falls apart :-). 
2) use ar to remove the offending function from libc.a.
3) compile and link with the "emasculated" libc.a.

This would have the added benefit that, if you replaced, say, malloc(), 
all other library functions that use malloc() would also use your "new, 
improved" malloc.
Alternatively, you could copy libc.a to your working directory, remove 
the offending functions, and modify the linker's search path putting your 
working directory first.

Bill Davidson
bdavidson AT ra DOT isisnet DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019