On Feb 29, 2008, at 3:00 PM, Shaun Jackman wrote:
On Fri, Feb 29, 2008 at 12:43 PM, Rick Altherr <[EMAIL PROTECTED]> wrote:Many linkers will coalesce copies of the same function from multiple object files. I'm not familiar with binutils enough to know if it does or not.In the standard use of avr-libc with gcc and binutils, you will get one copy of the function per object file that uses it. It would be a useful feature to eliminate duplicate copies of a function across multiple object files, but I do not know of one. Can you give an example of a linker that does do this? This feature would require cooperation from the compiler as well. I believe if you compile using GCC with the `-ffunction-sections' option to place each function in its own section, the linker then would then have enough information to be able to accomplish the above, but this approach certainly isn't typical. Cheers, Shaun
The example I am most familiar with is text coalescing with Apple's ld. Sadly, I can't give out details on how it works nor can I provide source.
-- Rick Altherr [EMAIL PROTECTED]"He said he hadn't had a byte in three days. I had a short, so I split it with him."
-- Slashdot signature
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
