Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1878,23 +1878,26 @@ // These are reserved for the specification (e.g.: mapping // symbols). We don't want to add them to the symbol table. - llvm::StringRef symbol_name_ref(symbol_name); - if (symbol_name_ref == "$a" || symbol_name_ref.startswith("$a.")) + if (symbol_type == eSymbolTypeCode) { - // $a[.]* - marks an ARM instruction sequence - m_address_class_map[symbol.st_value] = eAddressClassCode; - } - else if (symbol_name_ref == "$b" || symbol_name_ref.startswith("$b.") || - symbol_name_ref == "$t" || symbol_name_ref.startswith("$t.")) - { - // $b[.]* - marks a THUMB BL instruction sequence - // $t[.]* - marks a THUMB instruction sequence - m_address_class_map[symbol.st_value] = eAddressClassCodeAlternateISA; - } - else if (symbol_name_ref == "$d" || symbol_name_ref.startswith("$d.")) - { - // $d[.]* - marks a data item sequence (e.g. lit pool) - m_address_class_map[symbol.st_value] = eAddressClassData; + llvm::StringRef symbol_name_ref(symbol_name); + if (symbol_name_ref == "$a" || symbol_name_ref.startswith("$a.")) + { + // $a[.]* - marks an ARM instruction sequence + m_address_class_map[symbol.st_value] = eAddressClassCode; + } + else if (symbol_name_ref == "$b" || symbol_name_ref.startswith("$b.") || + symbol_name_ref == "$t" || symbol_name_ref.startswith("$t.")) + { + // $b[.]* - marks a THUMB BL instruction sequence + // $t[.]* - marks a THUMB instruction sequence + m_address_class_map[symbol.st_value] = eAddressClassCodeAlternateISA; + } + else if (symbol_name_ref == "$d" || symbol_name_ref.startswith("$d.")) + { + // $d[.]* - marks a data item sequence (e.g. lit pool) + m_address_class_map[symbol.st_value] = eAddressClassData; + } } continue; @@ -1907,16 +1910,19 @@ // These are reserved for the specification (e.g.: mapping // symbols). We don't want to add them to the symbol table. - llvm::StringRef symbol_name_ref(symbol_name); - if (symbol_name_ref == "$x" || symbol_name_ref.startswith("$x.")) - { - // $x[.]* - marks an A64 instruction sequence - m_address_class_map[symbol.st_value] = eAddressClassCode; - } - else if (symbol_name_ref == "$d" || symbol_name_ref.startswith("$d.")) + if (symbol_type == eSymbolTypeCode) { - // $d[.]* - marks a data item sequence (e.g. lit pool) - m_address_class_map[symbol.st_value] = eAddressClassData; + llvm::StringRef symbol_name_ref(symbol_name); + if (symbol_name_ref == "$x" || symbol_name_ref.startswith("$x.")) + { + // $x[.]* - marks an A64 instruction sequence + m_address_class_map[symbol.st_value] = eAddressClassCode; + } + else if (symbol_name_ref == "$d" || symbol_name_ref.startswith("$d.")) + { + // $d[.]* - marks a data item sequence (e.g. lit pool) + m_address_class_map[symbol.st_value] = eAddressClassData; + } } continue;