diff options
-rwxr-xr-x | tools/cygprofile/cyglog_to_orderfile.py | 4 | ||||
-rwxr-xr-x | tools/cygprofile/patch_orderfile.py | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tools/cygprofile/cyglog_to_orderfile.py b/tools/cygprofile/cyglog_to_orderfile.py index 6dd64ed..c3b1bec 100755 --- a/tools/cygprofile/cyglog_to_orderfile.py +++ b/tools/cygprofile/cyglog_to_orderfile.py @@ -147,8 +147,8 @@ def GetSymbolToSectionsMapFromObjectFiles(obj_dir): # complete, base, and allocating. If they're all the same they'll # get folded together. if not (re.match('[CD][123]E', symbol) and - (symbol_extractor.Demangle(symbol) == - symbol_extractor.Demangle(symbol_to_sections_map[symbol][0] + (symbol_extractor.DemangleSymbol(symbol) == + symbol_extractor.DemangleSymbol(symbol_to_sections_map[symbol][0] .lstrip('.text.')))): symbol_warnings.Write('Symbol ' + symbol + ' in conflicting sections ' + diff --git a/tools/cygprofile/patch_orderfile.py b/tools/cygprofile/patch_orderfile.py index 8e8ce58..a38343a 100755 --- a/tools/cygprofile/patch_orderfile.py +++ b/tools/cygprofile/patch_orderfile.py @@ -102,6 +102,10 @@ def _StripPrefix(line): def _SectionNameToSymbols(section_name, section_to_symbols_map): """Returns all symbols which could be referred to by section_name.""" + if (section_name == '' or + section_name == '.text.*' or + section_name == '.text'): + return # Don't return anything for catch-all sections if section_name in section_to_symbols_map: for symbol in section_to_symbols_map[section_name]: yield symbol @@ -217,7 +221,7 @@ def _PrintSymbolsAsSections(symbol_names, symbol_to_sections_map, output_file): for name in symbol_names: if name in symbol_to_sections_map: for linker_section in symbol_to_sections_map[name]: - if not linker_section in unique_outputs: + if linker_section != '.text' and not linker_section in unique_outputs: output_file.write(linker_section + '\n') unique_outputs.add(linker_section) else: |