Re: does the order of .a files matter?

2002-05-13 Thread Mikhail Teterin
On Monday 13 May 2002 02:06 am, Terry Lambert wrote: = If you think that providing bits on the link line in dependency = order is a natural way of linking and the proper way of doing = it, how do you explain our improper use of putting object files in = lexical order in libraries and how do

Re: does the order of .a files matter?

2002-05-13 Thread Terry Lambert
Mikhail Teterin wrote: = I explain the lexical ordering by way of the following commands when = exiting the Makefile in vi in command mode: = = !!ls *.c = J[...] = ISRCS=esc = = 8-). This does not explain anything. Whatever the joke was, I did not get it. These are the

Re: does the order of .a files matter?

2002-05-12 Thread Marcel Moolenaar
On Fri, May 10, 2002 at 01:35:56PM -0700, Terry Lambert wrote: Mikhail Teterin wrote: = For my information: Why didn't you take John De Bowsky's advice to: = = ld $objlist `lorder $liblist | tsort -q` I tried that before I asked on the mailing list the first time. It did

Re: does the order of .a files matter?

2002-05-12 Thread Terry Lambert
Marcel Moolenaar wrote: Here is what I think: Your proximal problem is that your libraries are badly organized, and therefore certain object files in them are not being pulled into the linking process, because your order of operation on the objects is not in dependency order, because

Re: does the order of .a files matter?

2002-05-10 Thread Mikhail Teterin
Is there a reason for it, or this just a not-yet-implemented feature? It certainly seems like the latter -- why make the user jump through all the sorting/reordering hoops? Generally, this won't be necessary for properly organized code. The code in question is organized by software

Re: does the order of .a files matter?

2002-05-10 Thread Terry Lambert
Mikhail Teterin wrote: Is there a reason for it, or this just a not-yet-implemented feature? It certainly seems like the latter -- why make the user jump through all the sorting/reordering hoops? Generally, this won't be necessary for properly organized code. The code in question

Re: does the order of .a files matter?

2002-05-10 Thread Mikhail Teterin
On Friday 10 May 2002 12:51 pm, Terry Lambert wrote: = Mikhail Teterin wrote: =Is there a reason for it, or this just a not-yet-implemented =feature? It certainly seems like the latter -- why make the user =jump through all the sorting/reordering hoops? = = Generally, this won't be

Re: does the order of .a files matter?

2002-05-10 Thread Terry Lambert
Mikhail Teterin wrote: = For my information: Why didn't you take John De Bowsky's advice to: = = ld $objlist `lorder $liblist | tsort -q` I tried that before I asked on the mailing list the first time. It did reduce the number of the undefined symbols, but not to zero. It's

Re: does the order of .a files matter?

2002-05-10 Thread Mikhail Teterin
On Friday 10 May 2002 04:35 pm, Terry Lambert wrote: = Mikhail Teterin wrote: = = For my information: Why didn't you take John De Bowsky's advice to: = = = = ld $objlist `lorder $liblist | tsort -q` = = I tried that before I asked on the mailing list the first time. It = did reduce

RE: does the order of .a files matter?

2002-05-10 Thread Don Bowman
Order-dependency on the link command line has been common behaviour in linkers forever as far as I know. This includes the FSF GNU linker, as well as the system linker shipped with Unix systems. It is a useful feature, allowing one to insert other objects in front, e.g. to override 'malloc'

Re: does the order of .a files matter?

2002-05-10 Thread Terry Lambert
Mikhail Teterin wrote: = Most linkers don't do what you want, which is make up for programmer = incompetence by doing an automatic topological sort on all symbol = dependencies, regardless of where or in what type of file the symbol = is defined, because most linkers treat archives and

Re: does the order of .a files matter?

2002-05-10 Thread Terry Lambert
Don Bowman wrote: Now, I suggest stopping the flame war, or take it somewhere else, this really doesn't have anything to do with FreeBSD. Yeah; it looks like he was really looking for an explanation of the failure of the OSF toolchain, and might not even be compiling on FreeBSD at all in the

Re: does the order of .a files matter?

2002-05-09 Thread Mikhail Teterin
On Wednesday 08 May 2002 09:52 pm, Terry Lambert wrote: = Mikhail Teterin wrote: [...] = The most frustrating thing is, the number of such symbols varies = greatly with the order, in which I list the libraries on the command = line. Is not the linker supposed to make several runs over the

Re: does the order of .a files matter?

2002-05-09 Thread Terry Lambert
Mikhail Teterin wrote: = The most frustrating thing is, the number of such symbols varies = greatly with the order, in which I list the libraries on the command = line. Is not the linker supposed to make several runs over the given = libraries if needed? = = No. It doesn't make several