mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-21 13:29:36 +00:00
Elf2Mac: don't insist that sections actually exist
This commit is contained in:
parent
b7f956111a
commit
a966fd5f8a
@ -97,8 +97,8 @@ Object::Object(string input)
|
|||||||
if(boost::algorithm::starts_with(name,".rela."))
|
if(boost::algorithm::starts_with(name,".rela."))
|
||||||
{
|
{
|
||||||
string progbitsName = name.substr(5);
|
string progbitsName = name.substr(5);
|
||||||
assert(sections.find(progbitsName) != sections.end());
|
if(sections.find(progbitsName) != sections.end())
|
||||||
sections[progbitsName]->SetRela(scn);
|
sections[progbitsName]->SetRela(scn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(shdr.sh_type == SHT_PROGBITS && (shdr.sh_flags & SHF_ALLOC))
|
if(shdr.sh_type == SHT_PROGBITS && (shdr.sh_flags & SHF_ALLOC))
|
||||||
|
@ -36,7 +36,8 @@ Symbol::Symbol(Object& theObject, const GElf_Sym &sym)
|
|||||||
if(st_shndx != SHN_UNDEF && st_shndx < SHN_LORESERVE)
|
if(st_shndx != SHN_UNDEF && st_shndx < SHN_LORESERVE)
|
||||||
{
|
{
|
||||||
section = theObject.sectionsByElfIndex[st_shndx];
|
section = theObject.sectionsByElfIndex[st_shndx];
|
||||||
sectionKind = section->kind;
|
if (section)
|
||||||
|
sectionKind = section->kind;
|
||||||
}
|
}
|
||||||
if(st_name)
|
if(st_name)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user