lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: move body of head-common.S back to text section
On Wed, Jul 03, 2013 at 01:19:07AM -0400, Paul Gortmaker wrote:
> As an aside, I'm now thinking any __INIT that implicitly rely on EOF for
> closure are nasty traps waiting to happen and it might be worthwhile to
> audit and explicitly __FINIT them before someone appends to the file...

That hides a different kind of bug though - I hate __FINIT for exactly
that reason. Consider this:

.text
blah blah blah
__INIT
lots of init stuff
__FINIT
more .text stuff

Now, someone comes along and modifies this to be:

.text
blah blah blah
.data
something else
__INIT
lots of init stuff
__FINIT
more .text stuff

Now, what is the effect of that __FINIT now? You get the following .text
emitted into the .data section instead. This is basically the same problem
you've just encounted.

Maybe:

__FINIT
.text

is the safest solution - and __FINIT becomes just a no-op marker to avoid
anyone relying on its properties.


\
 
 \ /
  Last update: 2013-07-03 12:21    [W:0.058 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site