Please sign in to comment.
Fix an issue with final subroutines and shared libraries
The problem occurs when the compiler tries to finalize a type extended object that's defined in a shared library. Pointers to its parent type descriptors are defined before the object's type descriptor. Using a negative pointer offet from the object's type descriptor object to reference its parent pointers is incorrect. In a shared library, the dynamic linker may not load these groups of pointers if they are not directly referenced. To fix this problem, we add a "parent pointer" label in front of the parent pointers and use this label to access the parent pointers instead of a negative offset. This requires that we add this label to the type descriptor. So, we took over the unused but reserved "constructor" field in the type descriptor. For backward compatibility, we will use the negative offset if the parent pointer field is NULL.
- Loading branch information...
Showing with 66 additions and 13 deletions.