Almost all the modules of the library are in the segments LIB_CODE and LDIV, but i don't know if we can separate some modules from these segments. Can we do it? And if yes, how can i do it?
Why do you want to do it? The whole point of a Library is that the Linker will only use those parts which are actually needed!
This part is reserved for the library but this one is free, i mean that it will put the function only if we need it(which is not bad, it is a gain of space). So for each version of a program(let's say that we will need different library each time), it will change the content of this space but i need some of these functions for a remote download. The space for these functions must be always the same and not to be erase during the time that i use the remote download code.
For what you call "remote download", you will need a separate, stand-alone version of the code that handles the download. This version must not make any use of the library functions of the piece of code it will remove and replace by something else. You'll usually have to link that "firmware" separately from the main program, and keep it in an isolated memory region.
I agree but I did not find the functions which can replace the library and i need these functions in the firmware. We read a code that was store in an external flash, via a bus I2c. So we need a long address. So I need such functions as multiplication,division...But now i found these functions. Thank you for your answers. Kaoru
You're not quite getting me yet. The trick you're missing is that you will have to have *two* copies of that library segment: one in the firmware part of the program, the other in the program it downloads into the flash. Essentially, you'll have to build the firmware and the linker as self-contained separate projects, including separate linker runs for each of them.