This is the mail archive of the gcc-help@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: .gnu.linkonce.? and .gcc_except_table


John Farmer <news02@lavabit.com> writes:

> I switched on RTTI and did get some link once sections as shown in the
> object file. They were not quite named the way I expected though. 
>
> For example I coded in a C++ file a simple class, MyClass, that consisted of
> just one constructor MyClass() defined inline.
>
> In the object file I got.
>
> _ZN7MyClassC1Ev which was shown as LINK_ONCE_DISCARD and also a
> .text._ZN7MyClassC1Ev section.
>
> I did not find any sections that used the prefix .gnu.linkonce.t., for
> example I would have expected to see a section named
> .gnu.linkonce.t._ZN7MyClassC1Ev
>
> I am using V4.1.1 of the GCC toolset if that is significant.
>
> Are these results as would be expected or should I have indeed got some
> .gnu.linkonce.t. prefixed sections?

If your GNU binutils are new enough, then gcc will use ELF section
groups instead of .gnu.linkonce sections.  objdump -h will report a
section group using "GROUP" in the list of flags.  .gnu.linkonce
sections were introduced back in the mid-90's; ELF section groups are a
newer, more flexible, approach.

Ian


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