lkml.org 
[lkml]   [2008]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pop previous section in alternative.c


On Thu, 10 Apr 2008, Andi Kleen wrote:
>
> So in summary valid section patterns are either
> .section / .previous or .pushsection .section .popsection

The thing is, we'd be much better off with some sanity checking in the
assembler.

Which is likely not going to happen - oh well.

In particular, the assembler should see patterns like

.size function, .-function

and it should be _trivially_ able to check that "." and "function" are in
the same section, and warn if they aren't. Because I don't see how it
could ever be valid to have sizes that cross section boundaries (it's a
totally nonsensical concept).

But it doesn't. Oh, well.

But maybe we can see it in the resulting object file somehow, and do the
check there (the same way we do the init-section analysis). I assume the
.size directive writes some debug info or similar, and we can create a big
warning when a size is unexpectedly huge and crosses section size
boundaries?

Linus


\
 
 \ /
  Last update: 2008-04-10 16:51    [W:0.067 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site