GCC 2 .eh_frame: The CIE offset in an FDE isn't always relative to the

beginning of the section, but probably relative to the beginning of the data
for the respective compilation unit (which might even make it useful again,
since it could be used as negative offset to the CIE). Relaxed the check even
more, so we always override the CIE offset when parsing .eh_frame sections.
This makes the variables appear in another test app Axel kindly provided.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33941 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-11-07 20:55:21 +00:00
parent 8665c30ace
commit 9669d0859b
+5 -3
View File
@@ -461,9 +461,11 @@ DwarfFile::UnwindCallFrame(CompilationUnit* unit,
return B_BAD_DATA;
// For some reason gcc 2.95.3 doesn't write the CIE offset, but
// always the offset of this entry's CIE pointer field. We fix
// it.
if (fUsingEHFrameSection && cieID == (uint64)lengthOffset)
// always the offset of this entry's CIE pointer field
// (probably even relative to the start of the data for the
// respective compilation unit). We simply assume the previous
// CIE we encountered is the right one.
if (fUsingEHFrameSection)
cieID = previousCIE;
TRACE_CFI(" found fde: length: %llu (%lld), CIE offset: %llu, "