ARM GCC rename static functions?

Andrew Haley aph@redhat.com
Mon Jun 27 17:46:00 GMT 2011


Please don't top-post on this list.

On 27/06/11 11:09, Pan ruochen wrote:
> On Mon, Jun 27, 2011 at 5:57 PM, Andrew Haley <aph@redhat.com> wrote:
>>
>> When optimizing, gcc generates clones of functions that are specialized to
>> particular tasks.  T.25 is a clone of register_signal_handler() that is
>> specialized to my_signal_handler().  You can see this if you read the assembly
>> language output.
>
> Well, there is not a symbol named 'register_signal_handler' in a.out.

That's right.  It isn't needed.  The original function has gone because
no-one uses it.

> I think gcc creates a new internal name T.25 to substitute the
> original register_signal_handler for some purpose.

Yes, and I just told you what that purpose was.

> Is there any option to disable this feature?
> I really think it brings me troubles in translating the T.xx stuff
> back to the original symbol names when I have to read the unassembly
> code.

That's always going to be a problem when optimizing, especially with
inlined functions.  There's no guarantee at all that generated code
has a 1:1 mapping to source code.

What version of gcc is this?  Mine generates "register_signal_handler.clone.0"
as a name for this.

Andrew.



More information about the Gcc-help mailing list