resolved conflicts for merge of bd321c11 to lmp-mr1-dev-plus-aosp
Change-Id: I6ee8a75840073ed00eda9f8f0fbd372cdcfb0be0
This commit is contained in:
@@ -1673,6 +1673,8 @@ void soinfo::CallConstructors() {
|
||||
// DT_INIT should be called before DT_INIT_ARRAY if both are present.
|
||||
CallFunction("DT_INIT", init_func);
|
||||
CallArray("DT_INIT_ARRAY", init_array, init_array_count, false);
|
||||
|
||||
resolve_ifunc_symbols();
|
||||
}
|
||||
|
||||
void soinfo::CallDestructors() {
|
||||
@@ -1734,6 +1736,14 @@ void soinfo::set_st_ino(ino_t ino) {
|
||||
}
|
||||
}
|
||||
|
||||
void soinfo::set_has_ifuncs(bool ifuncs) {
|
||||
if ((this->flags & FLAG_NEW_SOINFO) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
has_ifuncs = ifuncs;
|
||||
}
|
||||
|
||||
dev_t soinfo::get_st_dev() {
|
||||
if (has_min_version(0)) {
|
||||
return st_dev;
|
||||
@@ -2171,6 +2181,18 @@ bool soinfo::LinkImage(const android_dlextinfo* extinfo) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// if there are ifuncs, we need to do an additional relocation pass.
|
||||
// they cannot be resolved until the rest of the relocations are done
|
||||
// because we need to call the resolution function which may be waiting
|
||||
// on relocations.
|
||||
if(si->get_has_ifuncs()) {
|
||||
#if defined(__i386__)
|
||||
soinfo_ifunc_relocate(si, si->plt_rel, si->plt_rel_count, needed);
|
||||
#elif defined(__x86_64__)
|
||||
soinfo_ifunc_relocate(si, si->plt_rela, si->plt_rela_count, needed);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__mips__)
|
||||
if (!mips_relocate_got(this)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user