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


Jakub Jelinek wrote:

> But DECL_ONE_ONLY vs. non-DECL_ONE_ONLY semantics of a section specified
> in a section attribute is just one of the attributes of a section
> that a user should be able to tell to GCC.

If we actually think it's important for users to be able to declare
sections and their attributes in C code (rather than in assembly code),
then, yes, we need some set of extensions for that.  In my opinion,
that's fine, but expecting GCC to infer attributes from section names in
attributes is not.

> where an assembly comment char just comments out what GCC appends
> after the section name in .section directive, so that it doesn't override
> what was specified in assembly.

One could of course do much of this directly in assembly code.  I'm not
entirely convinced that the benefits of being able to do this in C (and
thus share one implementation across architectures) outweigh the costs
of pushing all this into the compiler.  That's not to say I think it's
not worth it; just that I think it should not be taken as axiomatic that
it should be possible to do all of this in C.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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