COFF: Implement sectionContainsSymbol for relocatable files only.

llvm-svn: 141884
This commit is contained in:
Michael J. Spencer 2011-10-13 20:36:54 +00:00
parent 596fa16dd3
commit 9a28851e52
1 changed files with 8 additions and 2 deletions

View File

@ -369,8 +369,14 @@ error_code COFFObjectFile::isSectionBSS(DataRefImpl Sec,
error_code COFFObjectFile::sectionContainsSymbol(DataRefImpl Sec,
DataRefImpl Symb,
bool &Result) const {
// FIXME: Unimplemented.
Result = false;
const coff_section *sec = toSec(Sec);
const coff_symbol *symb = toSymb(Symb);
const coff_section *symb_sec;
if (error_code ec = getSection(symb->SectionNumber, symb_sec)) return ec;
if (symb_sec == sec)
Result = true;
else
Result = false;
return object_error::success;
}