Add support for dynamic relocations (code object v2.1)

Change-Id: Ic19be97d3ea78b53f5aa814787515b587d0be21b
Этот коммит содержится в:
Konstantin Zhuravlyov
2016-05-25 15:41:31 -04:00
коммит произвёл Gerrit Code Review
родитель a8b00680b6
Коммит 5a14d496ab
4 изменённых файлов: 174 добавлений и 51 удалений
+3 -3
Просмотреть файл
@@ -1368,7 +1368,7 @@ namespace amd {
section = new GElfRelocationSection(this);
} else if (shdr.sh_type == SHT_STRTAB) {
section = new GElfStringTable(this);
} else if (shdr.sh_type == SHT_SYMTAB) {
} else if (shdr.sh_type == SHT_SYMTAB || shdr.sh_type == SHT_DYNSYM) {
section = new GElfSymbolTable(this);
} else if (shdr.sh_type == SHT_NULL) {
section = 0;
@@ -1391,14 +1391,14 @@ namespace amd {
for (size_t n = 1; n < sections.size(); ++n) {
GElfSection* section = sections[n].get();
if (section->type() == SHT_SYMTAB) {
if (section->type() == SHT_SYMTAB || section->type() == SHT_DYNSYM) {
if (!section->pullData()) { return false; }
}
}
for (size_t n = 1; n < sections.size(); ++n) {
GElfSection* section = sections[n].get();
if (section->type() != SHT_STRTAB && section->type() != SHT_SYMTAB) {
if (section->type() != SHT_STRTAB && section->type() != SHT_SYMTAB && section->type() != SHT_DYNSYM) {
if (!section->pullData()) { return false; }
}
}