This is the mail archive of the 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

Richard Sandiford wrote:

> I really think recognising ".gnu.linkonce" as a magic string is a bad
> idea.  There was talk on #gcc at the time about adding a new attribute
> specifically for making something link-once.  I still think that's the
> right way to go.

I agree with both points.

I think everyone agrees that, for ELF, it's unfortunate that there's as
much code as there is throughout the toolchain relying on section names.
 We should in general try to avoid adding more.  (Furthermore, the
special .gnu.linkonce semantics only apply if you're using the GNU
assembler (or perhaps GNU linker?) on an ELF system, so even if we did
recognize the string, we'd need to do it conditionally.)

In short, I, too, think an attribute would be much better.

I also think that DECL_ONE_ONLY should definitely apply only to
declarations with external linkage, i.e., with TREE_PUBLIC set.
Otherwise, we're squandering a valuable bit in the tree representation
for other declarations.

Mark Mitchell
(650) 331-3385 x713

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