Lines Matching refs:gsym
91 add_entry(Symbol_table*, Layout*, Symbol* gsym);
471 do_plt_address_for_global(const Symbol* gsym) const
472 { return this->plt_section()->address_for_global(gsym); }
572 Symbol* gsym);
592 Symbol* gsym);
629 should_apply_static_reloc(const Sized_symbol<32>* gsym,
747 can_convert_mov_to_lea(const Symbol* gsym)
749 gold_assert(gsym != NULL);
750 return (gsym->type() != elfcpp::STT_GNU_IFUNC
751 && !gsym->is_undefined ()
752 && !gsym->is_from_dynobj()
753 && !gsym->is_preemptible()
755 || (gsym->visibility() != elfcpp::STV_DEFAULT
756 && gsym->visibility() != elfcpp::STV_PROTECTED)
758 && strcmp(gsym->name(), "_DYNAMIC") != 0);
1070 Symbol* gsym)
1072 gold_assert(!gsym->has_plt_offset());
1075 if (gsym->type() == elfcpp::STT_GNU_IFUNC
1076 && gsym->can_use_relative_reloc(false))
1078 gsym->set_plt_offset(this->irelative_count_ * this->get_plt_entry_size());
1084 rel->add_symbolless_global_addend(gsym, elfcpp::R_386_IRELATIVE,
1087 gi.sym = gsym;
1095 gsym->set_plt_offset((this->count_ + 1) * this->get_plt_entry_size());
1106 gsym->set_needs_dynsym_entry();
1107 this->rel_->add_global(gsym, elfcpp::R_386_JUMP_SLOT, this->got_plt_,
1210 Output_data_plt_i386::address_for_global(const Symbol* gsym)
1213 if (gsym->type() == elfcpp::STT_GNU_IFUNC
1214 && gsym->can_use_relative_reloc(false))
1216 return this->address() + offset + gsym->plt_offset();
1501 Target_i386::make_plt_entry(Symbol_table* symtab, Layout* layout, Symbol* gsym)
1503 if (gsym->has_plt_offset())
1507 this->plt_->add_entry(symtab, layout, gsym);
2092 Symbol* gsym)
2095 object->name().c_str(), r_type, gsym->demangled_name().c_str());
2158 Symbol* gsym)
2161 if (gsym->type() == elfcpp::STT_GNU_IFUNC
2163 target->make_plt_entry(symtab, layout, gsym);
2177 if (gsym->needs_plt_entry())
2179 target->make_plt_entry(symtab, layout, gsym);
2184 if (gsym->is_from_dynobj() && !parameters->options().shared())
2185 gsym->set_needs_dynsym_value();
2188 if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type)))
2191 && gsym->may_need_copy_reloc())
2194 data_shndx, output_section, gsym, reloc);
2197 && gsym->type() == elfcpp::STT_GNU_IFUNC
2198 && gsym->can_use_relative_reloc(false)
2199 && !gsym->is_from_dynobj()
2200 && !gsym->is_undefined()
2201 && !gsym->is_preemptible())
2208 rel_dyn->add_symbolless_global_addend(gsym,
2215 && gsym->can_use_relative_reloc(false))
2218 rel_dyn->add_global_relative(gsym, elfcpp::R_386_RELATIVE,
2225 rel_dyn->add_global(gsym, r_type, output_section, object,
2237 if (gsym->needs_plt_entry())
2247 target->make_plt_entry(symtab, layout, gsym);
2250 if (gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type)))
2253 && gsym->may_need_copy_reloc())
2256 data_shndx, output_section, gsym, reloc);
2261 rel_dyn->add_global(gsym, r_type, output_section, object,
2279 && Target_i386::can_convert_mov_to_lea(gsym))
2288 if (gsym->final_value_is_known())
2291 if (gsym->type() == elfcpp::STT_GNU_IFUNC)
2292 got->add_global_plt(gsym, GOT_TYPE_STANDARD);
2294 got->add_global(gsym, GOT_TYPE_STANDARD);
2314 if (gsym->is_from_dynobj()
2315 || gsym->is_undefined()
2316 || gsym->is_preemptible()
2317 || (gsym->visibility() == elfcpp::STV_PROTECTED
2319 || (gsym->type() == elfcpp::STT_GNU_IFUNC
2321 got->add_global_with_rel(gsym, GOT_TYPE_STANDARD,
2329 if (gsym->type() != elfcpp::STT_GNU_IFUNC)
2330 is_new = got->add_global(gsym, GOT_TYPE_STANDARD);
2333 is_new = got->add_global_plt(gsym, GOT_TYPE_STANDARD);
2336 if (gsym->is_from_dynobj()
2338 gsym->set_needs_dynsym_value();
2342 unsigned int got_off = gsym->got_offset(GOT_TYPE_STANDARD);
2343 rel_dyn->add_global_relative(gsym, elfcpp::R_386_RELATIVE,
2354 if (gsym->final_value_is_known())
2359 if (gsym->is_defined()
2360 && !gsym->is_from_dynobj()
2361 && !gsym->is_preemptible())
2363 target->make_plt_entry(symtab, layout, gsym);
2401 const bool is_final = gsym->final_value_is_known();
2413 got->add_global_pair_with_rel(gsym, GOT_TYPE_TLS_PAIR,
2423 got->add_global_with_rel(gsym, GOT_TYPE_TLS_NOFFSET,
2428 unsupported_reloc_global(object, r_type, gsym);
2443 got->add_global_pair_with_rel(gsym, GOT_TYPE_TLS_DESC, rt,
2451 got->add_global_with_rel(gsym, GOT_TYPE_TLS_NOFFSET,
2456 unsupported_reloc_global(object, r_type, gsym);
2469 unsupported_reloc_global(object, r_type, gsym);
2487 rel_dyn->add_global_relative(gsym, elfcpp::R_386_RELATIVE,
2501 got->add_global_with_rel(gsym, got_type,
2506 unsupported_reloc_global(object, r_type, gsym);
2519 rel_dyn->add_global(gsym, dyn_r_type, output_section, object,
2541 unsupported_reloc_global(object, r_type, gsym);
2691 Target_i386::Relocate::should_apply_static_reloc(const Sized_symbol<32>* gsym,
2708 if (gsym == NULL)
2717 bool has_dyn = gsym->needs_dynamic_reloc(ref_flags);
2719 && gsym->can_use_relative_reloc(ref_flags
2733 const Sized_symbol<32>* gsym,
2743 || gsym == NULL
2744 || strcmp(gsym->name(), "___tls_get_addr") != 0)
2761 if (gsym != NULL
2762 && gsym->type() == elfcpp::STT_GNU_IFUNC
2764 && gsym->needs_dynamic_reloc(Scan::get_reference_flags(r_type))
2765 && gsym->can_use_relative_reloc(false)
2766 && !gsym->is_from_dynobj()
2767 && !gsym->is_undefined()
2768 && !gsym->is_preemptible())
2773 else if (gsym != NULL
2774 && gsym->use_plt_offset(Scan::get_reference_flags(r_type)))
2776 symval.set_output_value(target->plt_address_for_global(gsym));
2779 else if (gsym == NULL && psymval->is_ifunc_symbol())
2797 if (should_apply_static_reloc(gsym, r_type, true, output_section))
2802 if (should_apply_static_reloc(gsym, r_type, true, output_section))
2807 if (should_apply_static_reloc(gsym, r_type, false, output_section))
2812 if (should_apply_static_reloc(gsym, r_type, false, output_section))
2817 if (should_apply_static_reloc(gsym, r_type, false, output_section))
2822 if (should_apply_static_reloc(gsym, r_type, false, output_section))
2827 gold_assert(gsym == NULL
2828 || gsym->has_plt_offset()
2829 || gsym->final_value_is_known()
2830 || (gsym->is_defined()
2831 && !gsym->is_from_dynobj()
2832 && !gsym->is_preemptible()));
2844 && ((gsym == NULL && !psymval->is_ifunc_symbol())
2845 || (gsym != NULL
2846 && Target_i386::can_convert_mov_to_lea(gsym))))
2860 if (gsym != NULL)
2862 gold_assert(gsym->has_got_offset(GOT_TYPE_STANDARD));
2863 got_offset = (gsym->got_offset(GOT_TYPE_STANDARD)
2923 this->relocate_tls(relinfo, target, relnum, rel, r_type, gsym, psymval,
2955 const Sized_symbol<32>* gsym,
2967 const bool is_final = (gsym == NULL
2969 : gsym->final_value_is_known());
2980 || issue_undefined_symbol_error(gsym));
2994 if (gsym != NULL)
2996 gold_assert(gsym->has_got_offset(got_type));
2997 got_offset = gsym->got_offset(got_type) - target->got_size();
3033 || issue_undefined_symbol_error(gsym));
3056 if (gsym != NULL)
3058 gold_assert(gsym->has_got_offset(got_type));
3059 got_offset += gsym->got_offset(got_type) - target->got_size();
3073 || issue_undefined_symbol_error(gsym));
3110 || issue_undefined_symbol_error(gsym));
3146 || issue_undefined_symbol_error(gsym));
3163 || issue_undefined_symbol_error(gsym));
3179 if (gsym != NULL)
3181 gold_assert(gsym->has_got_offset(got_type));
3182 got_offset = gsym->got_offset(got_type);
3212 || issue_undefined_symbol_error(gsym));
3228 || issue_undefined_symbol_error(gsym));
3750 Target_i386::do_dynsym_value(const Symbol* gsym) const
3752 gold_assert(gsym->is_from_dynobj() && gsym->has_plt_offset());
3753 return this->plt_address_for_global(gsym);