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] |
>>> overridden definition.If you wish to override the definition of a symbol, add an object [...] defining that symbol before the library containing the
The problem with this solution is that it requires a specific link order. I cannot guarantee that the user will specify the libraries and object files in the correct order on the linker command line to achieve this effect.
I don't use newlib at the moment, but: normally, when invoking the linker through the compiler driver, the C library and other internal libraries, such as libgloss.a should be added to the end of the user's command line automatically.
Furthermore, I'm not sure that weak does the right thing: if the non-weak definition happens to be in an archive *behind* newlib (or libgloss), and the symbol has already been resolved by the weak definition in newlib, will the member containing the non-weak definition be extracted?
All these complications are avoided if "fall-back" definitions are put into individual .o files. This is completely independent of whether to mark the definition weak or not.
Newlib is a _library_. By definition, it is used in projects we have absolutely no knowledge about. Who are we to decide whether the size of the final executable is a real concern or not?
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |