This is the mail archive of the mailing list for the binutils 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: Map "" and ".text.unlikely" input section prefixes to separate output sections.

>>> Unfortunately it leaves us adding more special cases for section
>>> names, which I really dislike.  Is there any happy medium?
>> I understand the dislike, but I don't see an alternative.  We should
>> have spoken up before the hot/cold support was added to gcc.  I also
>> dislike the fact that -ffunction-sections can generate section names
>> that match the names chosen for hot/cold sections.

Is it truly too late to fix this? It would help to have a more
rigorous way of naming these sections. I'd like to modify HJ's old
idea from that PR slightly, and suggest a naming scheme like this when
-ffunction-sections is on:


Where "class" can be "hot", "unlikely", "startup", "exit", or just the
empty string. With -ffunction-sections off, the ".function" would be
omitted and names would look like they do now. (The same scheme can be
applied to ".data" and other sections.)

The linkers would assign input sections to output sections by the
first component, group input sections within the output section by the
second component, and ignore the third component (with the option to
provide explicit section reordering options based on the full input
section name).


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