This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Link problems with section anchors


Alan Modra <amodra@bigpond.net.au> writes:
> On Wed, Aug 09, 2006 at 07:28:18AM +0100, Richard Sandiford wrote:
>> Yes, but as David says, changing _sections_ with the section attribute
>> is fine.  Our position is that changing program semantics isn't.
>> And that's the difference between .sdata and .gnu.linkonce.
>> The former doesn't change program semantics but the latter does.
>
> Eh?  Setting the section name to .gnu.linkonce.* _already_ changes
> program semantics.  The linker knows that .gnu.linkonce.* is special, at
> least if you're using the GNU linker.

I think we're talking past each other.  My position (and I believe Mark
and David's position) is that attribute ((section (".gnu.linkonce.*")))
is an invalid construct for that very reason.  The section attribute
cannot be used to change semantics.  It can only be used to change
the layout of the linked object.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]