proc: round TLS segment size to its alignment (#1682)
The fix for #1428 was buggy, partly because I communicated poorly. Sorry about that. The size of the TLS segment should be padded such that TLS addresses are congruent in the file to where they will end up memory, i.e. (tlsoffset%align) == (vaddr%align). In most cases, vaddr will be aligned and it won't matter, but if not then simply aligning the end of the segment is incorrect. This should be right. (For the record, the current rounding logic is working in bits, but PtrSize is in bytes, so it wasn't working as originally intended either.)
Showing
想要评论请 注册 或 登录