In order to further reduce our consumption of ppc TOC entries, consider revamping the way script globals (and their locks) are emitted by the translator. It may be sufficient to plop them all into a single global struct, like this: BEFORE: int64_t global_var; rwlock_t global_var_lock; int64_t global_var2; rwlock_t global_var2_lock; ... AFTER: struct globals { int64_t var; rwlock_t var_lock; int64_t var2; rwlock_t var2_lock; ... } globals; Of course, code that refers to the values would have to adapt.
patch committed