Re: Please include const-sections into linux-next

Andi Kleen
2011-10-19T16:15:41Z

On Wed, Oct 19, 2011 at 10:54:23AM -0500, James Bottomley wrote:
>
> > One alternative to track it down would be to apply the attached
> > patch to the gcc, then gcc would print it out.
>
> I think the basic problem that excites the toolchain somehow is
> sectional annotations. Can't we just dump them and do it all in a

We already use these annotations all over. Just currently they mess up
the 'r' and 'w' bits on the sections because a few (not the majority)
of declarations mismatch the ro vs rw sections. My patchkit was just trying
to fix up those that were wrong

So you should be already using them.

Just need to find out what triggers your toolchain with these changes.
I suspect it's some kind of toolchain bug.

> linker script? Linker scripts seem to be much better tested.

The linker script just declares the order of the section.
The attributes are a union of what the compiler declares.
To dump them I just use objdump --section-headers or
readelf -a usually.

-Andi
--
ak@linux.intel.com -- Speaking for myself only.