-
- if (atsign != NULL && atsign[1] == '@' && atsign > sym->name)
- {
- int len = atsign - sym->name;
-
- record_minimal_symbol (reader,
- gdb::string_view (sym->name, len),
- true, symaddr, ms_type, sym->section,
- objfile);
- }
- }
-
- /* For @plt symbols, also record a trampoline to the
- destination symbol. The @plt symbol will be used in
- disassembly, and the trampoline will be used when we are
- trying to find the target. */
- if (msym && ms_type == mst_text && type == ST_SYNTHETIC)
- {
- int len = strlen (sym->name);
-
- if (len > 4 && strcmp (sym->name + len - 4, "@plt") == 0)
+ bool is_at_symbol = atsign != nullptr && atsign > sym->name;
+ bool is_plt = is_at_symbol && strcmp (atsign, "@plt") == 0;
+ int len = is_at_symbol ? atsign - sym->name : 0;
+
+ if (is_at_symbol
+ && !is_plt
+ && (elf_sym->version & VERSYM_HIDDEN) == 0)
+ record_minimal_symbol (reader,
+ gdb::string_view (sym->name, len),
+ true, symaddr, ms_type, sym->section,
+ objfile);
+ else if (is_plt)