Lines Matching refs:to
19 // along with this program; if not, write to the Free Software
50 // Symbol structure. Setting the VERSION_ field to NULL ensures
156 // This gives us values from 0 to 11.
198 // Any target which wants to handle STB_LOOS, etc., needs to
234 // we see a symbol. TO is the pre-existing symbol. ST_SHNDX is the
239 // non-ordinary section indexes are mapped to SHN_UNDEF. VERSION is
244 Symbol_table::resolve(Sized_symbol<size>* to,
250 // It's possible for a symbol to be defined in an object file
251 // using .symver to give it a version, and for there to also be
253 // don't want to give a multiple-definition error for this
256 if (to->source() == Symbol::FROM_OBJECT
257 && to->object() == object
259 && to->is_defined()
260 && to->shndx(&to_is_ordinary) == st_shndx
262 && to->value() == sym.get_st_value())
269 sized_target->resolve(to, sym, object, version);
276 to->set_in_reg();
279 && (to->visibility() == elfcpp::STV_HIDDEN
280 || to->visibility() == elfcpp::STV_INTERNAL))
282 // it is good to be helpful, but the warning leads to build error
289 to->set_in_dyn();
293 // symbol is referenced from outside the world known to the plugin).
295 to->set_in_real_elf();
297 // If we're processing replacement files, allow new symbols to override
301 if (to->source() == Symbol::FROM_OBJECT)
303 Pluginobj* obj = to->object()->pluginobj();
310 if (to->is_common() && !is_ordinary && st_shndx == elfcpp::SHN_COMMON)
313 tosize = to->symsize();
314 tovalue = to->value();
316 this->override(to, sym, st_shndx, is_ordinary, object, version);
319 if (tosize > to->symsize())
320 to->set_symsize(tosize);
321 if (tovalue > to->value())
322 to->set_value(tovalue);
331 // store such pairs and look them up later to make sure they
332 // actually refer to the same lines of code. We also check
336 // violation. But it's helpful to warn about.)
339 || to->binding() == elfcpp::STB_WEAK)
341 && to->shndx(&to_is_ordinary) != elfcpp::SHN_UNDEF
344 && to->symsize() != 0
345 && (sym.get_st_type() != to->type()
346 || sym.get_st_size() != to->symsize())
347 // C does not have a concept of ODR, so we only need to do this
349 && to->name()[0] == '_' && to->name()[1] == 'Z')
353 Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary),
354 static_cast<off_t>(to->value()) };
355 this->candidate_odr_violations_[to->name()].insert(fromloc);
356 this->candidate_odr_violations_[to->name()].insert(toloc);
362 ? to->type()
371 typename Sized_symbol<size>::Size_type tosize = to->symsize();
372 if (Symbol_table::should_override(to, frombits, fromtype, OBJECT,
376 elfcpp::STB tobinding = to->binding();
377 typename Sized_symbol<size>::Value_type tovalue = to->value();
378 this->override(to, sym, st_shndx, is_ordinary, object, version);
381 if (tosize > to->symsize())
382 to->set_symsize(tosize);
383 if (tovalue > to->value())
384 to->set_value(tovalue);
390 to->set_undef_binding(tobinding);
398 to->set_symsize(sym.get_st_size());
399 if (sym.get_st_value() > to->value())
400 to->set_value(sym.get_st_value());
406 to->set_undef_binding(sym.get_st_bind());
408 // The ELF ABI says that even for a reference to a symbol we
410 to->override_visibility(sym.get_st_visibility());
419 to, OBJECT, object);
424 to, OBJECT, object);
428 to, OBJECT, object);
433 // existing symbol, TO, and a bitflag describing the new symbol. This
435 // one, and returns false otherwise. It sets *ADJUST_COMMON_SIZES to
436 // true if we should set the symbol size to the maximum of the TO and
440 Symbol_table::should_override(const Symbol* to, unsigned int frombits,
449 if (to->source() == Symbol::IS_UNDEFINED)
450 tobits = symbol_to_bits(to->binding(), false, elfcpp::SHN_UNDEF, true,
451 to->type());
452 else if (to->source() != Symbol::FROM_OBJECT)
453 tobits = symbol_to_bits(to->binding(), false, elfcpp::SHN_ABS, false,
454 to->type());
458 unsigned int shndx = to->shndx(&is_ordinary);
459 tobits = symbol_to_bits(to->binding(),
460 to->object()->is_dynamic(),
463 to->type());
466 if ((to->type() == elfcpp::STT_TLS) ^ (fromtype == elfcpp::STT_TLS)
467 && !to->is_placeholder())
471 to, defined, object);
475 // cases; 3) it is easy to change the handling of a particular case.
477 // to
478 // but that is no easier to understand than this large switch
506 if ((to->source() == Symbol::FROM_OBJECT && to->object()->just_symbols())
513 to, defined, object);
521 // definition causes the weak definition to be overridden. We
523 // we should add a target specific option to change this.
553 to, defined, object);
588 to, defined, object);
606 // we need to remember that the original undef was weak.
628 // we need to remember that the original undef was not weak.
639 // we need to remember that the original undef was weak.
659 // For a dynamic def, we need to remember which kind of undef we see.
698 // For a dynamic def, we need to remember which kind of undef we see.
738 to, defined, object);
756 // Set the size to the maximum.
813 // Set the size to the maximum.
835 // Set the size to the maximum.
844 // Issue an error or warning due to symbol resolution. IS_ERROR
846 // message; it is expected to have a %s for the symbol name. TO is
851 // symbol is defined, we should be able to pull the location from the
856 const Symbol* to, Defined defined,
859 std::string demangled(to->demangled_name());
895 if (to->source() == Symbol::FROM_OBJECT)
896 objname = to->object()->name().c_str();
907 Symbol_table::should_override_with_special(const Symbol* to,
914 bool ret = Symbol_table::should_override(to, frombits, fromtype, defined,
958 // one version (from a version script), but we want to define it
968 // Special symbols are always considered to be regular symbols.
978 // We shouldn't see these flags. If we do, we need to handle them
1032 // script to restrict this to only the ones needed for implemented
1035 // We have to instantiate both big and little endian versions because
1042 Sized_symbol<32>* to,
1053 Sized_symbol<32>* to,
1066 Sized_symbol<64>* to,
1077 Sized_symbol<64>* to,