On 06.01.18 15:21, georg chambert wrote: > Now I got some back-of-the-head hunch, so I re-arranged so that the .a > was first in the link-list, and sure enough the vector_11 was now a > fine address to the ISR, and the load-module work (what I can see so > far) > > WHAT WAS THAT, is my question (I usuallly want to understand whats > happening, otherwise things tend to come back in some other shape and > bite u)
Too true. But your example runs contrary to my experience, which is that it is necessary to place a library (.a) _after_ all the object files which need it, because the linker reads each file only once. Thus a .o file on the command line after a needed .a will fail to have its externals satisfied by the library which has already whizzed past, and is gone. Crux: Only the parts of a library which are required for unsatisfied externals are pulled in by the linker. So place the libraries last, with libraries needing other libraries preceding those which don't. If there are reciprocal or cyclical dependencies, then list them thus: "-( archives -)", and ld will search them repeatedly until no new undefined references are created. Erik _______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
