avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] [RFC] New eeprom.h


From: Rick Altherr
Subject: Re: [avr-libc-dev] [RFC] New eeprom.h
Date: Fri, 29 Feb 2008 15:05:42 -0800


On Feb 29, 2008, at 3:00 PM, Shaun Jackman wrote:

On Fri, Feb 29, 2008 at 12:43 PM, Rick Altherr <address@hidden> 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
address@hidden

"He said he hadn't had a byte in three days. I had a short, so I split it with him."
 -- Slashdot signature


Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]