[llvm-commits] MachOObjectFile::getSectionName

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Dec 1 19:27:56 PST 2012


I was trying to get EH working with the MCJIT on darwin, but my code
was failing to find the EH section. Turns out that the problem was
that in MachOObjectFile::getSectionName we have

 static char result[34];
 ...
 Result = StringRef(result);

And the code in MCJIT stores that StringRef. I assume the bug is in
MachOObjectFile::getSectionName, not in MCJIT. If I remember
correctly, one of the objectives of the Object library was to point
directly into the mapped buffer with the object file in it. If that is
the case, shouldn't MachOObjectFile::getSectionName return just
Sect->Name and have another function for getting the
Sect->SegmentName?

Cheers,
Rafael



More information about the llvm-commits mailing list