[Top][All Lists]

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

Re: [avr-gcc-list] modulo vs. loop (gcc 4.3.x bug)

From: Erik Christiansen
Subject: Re: [avr-gcc-list] modulo vs. loop (gcc 4.3.x bug)
Date: Mon, 29 Mar 2010 12:08:18 +1100
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

On Sun, Mar 28, 2010 at 03:37:16PM +0200, Szikra Istvan wrote:
> >> If it's generating calls from my function (unwanted), it could be so
> >> kind to put the callee next to the caller.

Perhaps I misunderstand your wish, but this seems possible only the
first time a function is called. And if it is called only once, then it
might as well be in-line.

> The compiler generates function calls from a peace of code, but
> does not tell the linker to keep it together. Probably the compiler
> doesn't even know, because it doesn't see the big picture. But I do!
> so how do I tell the compiler to stop messing around, and I know what
> I'm doing so leave that part of the code alone, or stop recognizing
> that pattern in the entire project?

Since the discussion has proceeded this far, you've presumably not had
satisfaction from choosing for yourself where a function lives?:

void foo(void) __attribute__ ((section (".bootloader")));

When finer control of the placement of code in the binary is required,
it is only necessary to write one's own linker script. This takes time
and effort to learn, but it is satisfying when the result is exactly as

The ld manpage is not overly informative, but its info page is a


If at first you don't succeed, try again.
Then Quit. No use being a damn fool about it.              - W.C. Fields

reply via email to

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