This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: .glue_7 and .glue_7t sections
- From: Ian Lance Taylor <iant at google dot com>
- To: John Farmer <news02 at lavabit dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 24 Mar 2009 15:40:58 -0700
- Subject: Re: .glue_7 and .glue_7t sections
- References: <22688986.post@talk.nabble.com>
John Farmer <news02@lavabit.com> writes:
> As far as I have been able to determine these sections are provided to store
> ARM/Thumb interworking code. I am using a Cortex-M3 CPU which only supports
> the thumb instruction set so these sections are all empty in my build.
>
> Why are these sections so named?
>
> Does their presence indicate that my command-line options are incorrect in
> anyway?
>
> Is there any documentation available for these sections? I have looked
> through the GCC docs but found nothing on this subject!
Those stub sections are generated by the linker, not by gcc itself, so
any documentation would be associated with the linker. That said, I
don't think the GNU linker provides any documentation for them either.
The sections are named 'glue' because they glue together ARM and Thumb
code. I assume the 7 is there because the ARM7 was the first one to
support Thumb code. .glue_7 is used for ARM code calling Thumb code,
and .glue_7t is used for Thumb code calling ARM code.
The linker always creates the sections. However, I would have expected
them to be discarded if they are empty. I don't know why that doesn't
happen. In any case, it does no harm to have empty sections.
Ian