This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Moving libc/sys to be linked last


Citando Jeff Johnston <jjohnstn@redhat.com>:

 Jonathan S. Shapiro wrote:
 > On Wed, 2005-10-26 at 20:04 +0100, pedro_alves@portugalmail.pt wrote:
 > 
 >>Hi all!
 >>This is my first post to this list.
 >>
 >>In my target (arm-wince-pe), I want to override some objects from unix dir,
 >>but in libc/Makefile.am, 
 >>both SUBDIRS and SUBLIBS don't list sys before the unix dir.
 >>In my local copy, I moved them to the end, and now I get the wanted effect.
 
 >>Is this the right way to do it? 
 >>Is there any reason sys wasn't put the last in the first place?
 > 
 > 
 > What you describe would require sys/ to be *first*, not last. The rule
 > is: "first resolution wins".
 > 
 > However, I suspect that this is not the best way to achieve what you
 > want. I do not know what the "approved" way is.
 > 
 > shap
 > 
 
 Pedro is correct that the order isn't quite right and that the sys 
 objects should be added at the end.
 
 The resolution isn't "link resolution".  Libc is built manually in 
 libc/Makefile.am by traversing the SUBLIB list and using ar to 
 deconstruct each SUBLIB into its .o files which it places in a temporary 
 directory.  Once complete, it then rebuilds the library from all the .o 
 files in the temporary directory.  The last library to add its .o files 
 wins.
 
 For linux, newlib gets the shared libc library right because it uses 
 special awk files to build the library and the last 3 set of objects 
 added are:
 
 machine objects
 sys objects
 sys/machine objects
 
 I will fix this.
 
 -- Jeff J.
 
 
Yes, that's what I meant.
Thanks, it works now.

Cheers,
Pedro Alves

__________________________________________________________
Email gratuito com 2 000 MB
Espaço para guardar 1 milhão de mensagens
http://www.portugalmail.pt/2000mb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]