On 11/30/20 5:16 AM, Martin Liška wrote:
> On 11/13/19 7:29 AM, Strager Neds wrote:
>> -/* Worker for set_section. */
>> +void
>> +symtab_node::set_section_for_node (const symtab_node &other)
>> +{
>> + if (x_section == other.x_section)
>> + return;
>> + if (get_section () && other.get_sect
On 11/13/19 7:29 AM, Strager Neds wrote:
-/* Worker for set_section. */
+void
+symtab_node::set_section_for_node (const symtab_node &other)
+{
+ if (x_section == other.x_section)
+return;
+ if (get_section () && other.get_section ())
+gcc_checking_assert (strcmp (get_section (), other.
On 11/12/19 11:29 PM, Strager Neds wrote:
> Several parts of GCC need to copy a section name from one tree (or
> symtab_node) to another. Currently, this is implemented naively:
>
> 1. Query the source's section name
> 2. Hash the section name string
> 3. Find the section_hash_entry in the symbol
Several parts of GCC need to copy a section name from one tree (or
symtab_node) to another. Currently, this is implemented naively:
1. Query the source's section name
2. Hash the section name string
3. Find the section_hash_entry in the symbol table
4. Increment the section_hash_entry's reference