https://sourceware.org/bugzilla/show_bug.cgi?id=20529
Bug ID: 20529 Summary: Gold [powerpc] - relaxing loop never ends Product: binutils Version: 2.28 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: shenhan at google dot com CC: ian at airs dot com Target Milestone: --- Here is one particular case that causes gold PPC linker trapped in a endless relaxing loop. (I do not provide a reproducible case because the objects involved are proprietary). Here is the case - -------------- | | | 0x1b9446f0 | | | <- stub_table | ... | |------------| | | | | |------------| | 0x1c71e3d0 |----- |------------| | | | | | | | | | | jump delta = 0x2000000 | | | (>= max_branch_offset, which is 0x2000000) | | | | | | |------------| | | 0x1e71e3d0 | <--| |----------- | | | | | So a long branch stub is added, which is 16-byte, and this pushes the section forward, thus get to the following: -------------- | | | 0x1b9446f0 | | | <- stub_table | a new stub | | ... | |------------| | | | | |------------| | 0x1c71e3e0 |----- |------------| | | | | | | | | | | jump delta < 0x2000000 | | | no stub needed | | | | | | |------------| | | 0x1e71e3d0 | <--| (the jump target is *NOT* pushed forward? why?) |----------- | | | | | Now for this particular branch_info, we do not add a branch stub. So stub table shrinks by 16 bytes, and we get back to the first graph. Thus causes the indefinite loop. The solution is to only allow growth of stub tables after a few relax iterations. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils