Re: Please include const-sections into linux-next

From: Andi Kleen
Date: Wed Oct 19 2011 - 12:15:41 EST


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@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/