input sections difference "ax" vs "axG" ?

Akhilesh Chirlancha akhileshchirlancha.linux@gmail.com
Tue Sep 1 16:11:17 GMT 2020


Why the same ARM gcc creating 2 different types of input sections?
(.gnu.linkonce.t "ax") and (.group "axG")

I have 2 ARM toolchain releases. one toolchain is generating the input
sections with ".gnu.linkonce.t" prefix('ax') and another toolchain is with
".group" sections('axG').
And the toolchain with the .gnu.linkonce.t is throwing an error sometimes
""defined in discarded section" and "undefined reference"".
I do not have any clue why it's choosing 2 different types of input
sections even if there are no changes in the toolchain sources.

What could be the reason behind this? If there is somewhere better for me
to be looking, I would appreciate a pointer.

FYI, my toolchain components versions are gcc-5.2.0, binutils-2.25.1,
glibc-2.22

<----------------------------------------------------------------------------------------------------------------------------------------------->
toolchain-1:
=========
        .file   "sample.cpp"
        .section        .gnu.linkonce.t._ZN6SampleC1Ev,"ax",%progbits
        .align  2
        .weak   _ZN6SampleC1Ev


        .section
 .gnu.linkonce.t._ZN6Sample10inline_funEv,"ax",%progbits
        .align  2
        .weak   _ZN6Sample10inline_funEv

toolchain-2:
=========
        .file   "sample.cpp"
        .section
 .text._ZN6SampleC2Ev,"axG",%progbits,_ZN6SampleC5Ev,comdat
        .align  2
        .weak   _ZN6SampleC2Ev

        .section
 .text._ZN6Sample10inline_funEv,"axG",%progbits,_ZN6Sample10inline_funEv,comdat
        .align  2
        .weak   _ZN6Sample10inline_funEv
<----------------------------------------------------------------------------------------------------------------------------------------------->

-Akhilesh


More information about the Gcc-help mailing list