Re: huge gcc 4.1.{0,1} __weak problem

Jakub Jelinek
2008-05-01T22:51:48Z

On Thu, May 01, 2008 at 03:42:38PM -0700, Andrew Morton wrote:
> Is there some vaguely maintainable workaround we can do? If the problem
> only affects completely-empty weak functions then we could put something in
> them to make them non-empty?

for (;;); isn't enough, the function would be still considered const and by
4.1.0 and some 4.1.1 incorrectly optimized out, without regard to weak
attribute.
But e.g.
asm ("");
should be enough.

Jakub