Re: [PATCH v3 2/2] objtool: fix .cold functions parent symbols search

2018-11-19 Thread Josh Poimboeuf
On Mon, Nov 12, 2018 at 01:55:19PM +0100, Artem Savkov wrote: > Because find_symbol_by_name() traverses the same lists as read_symbols() > changing sym->name in place without copying it affects the result of > find_symbol_by_name() and, in case when ".cold" function precedes it's > parent in

Re: [PATCH v3 2/2] objtool: fix .cold functions parent symbols search

2018-11-19 Thread Josh Poimboeuf
On Mon, Nov 12, 2018 at 01:55:19PM +0100, Artem Savkov wrote: > Because find_symbol_by_name() traverses the same lists as read_symbols() > changing sym->name in place without copying it affects the result of > find_symbol_by_name() and, in case when ".cold" function precedes it's > parent in

[PATCH v3 2/2] objtool: fix .cold functions parent symbols search

2018-11-12 Thread Artem Savkov
Because find_symbol_by_name() traverses the same lists as read_symbols() changing sym->name in place without copying it affects the result of find_symbol_by_name() and, in case when ".cold" function precedes it's parent in sec->symbol_list, can result in function being considered a parent of

[PATCH v3 2/2] objtool: fix .cold functions parent symbols search

2018-11-12 Thread Artem Savkov
Because find_symbol_by_name() traverses the same lists as read_symbols() changing sym->name in place without copying it affects the result of find_symbol_by_name() and, in case when ".cold" function precedes it's parent in sec->symbol_list, can result in function being considered a parent of