According to the specification, CIE code alignment factor is an arbitrary unsigned LEB128 encoded value.
Details
Diff Detail
Event Timeline
Even though the blog post from Ian Lance Taylor says that "... should always be 1 for .eh_frame." there is no such thing in the standard and both ld and gold allow arbitrary code alignment factor. Hence, there is no reason lld should enforce the value to be 1.
Furthermore, this breaks while linking objects on some platforms; for example the binutils assembler uses code alignment 4 when emitting the CFI on arm64 which is the most sensible thing to use, since instructions are always 4-byte aligned.
LGTM. Thank you for the explanation. I believe this code was (accidentally) added as per the description that Ian Lance Taylor wrote.
On second thought, is it okay to just discard the information here? I'm wondering if we need to respect specified alignment requirements.
I just experienced this error while trying to build glib for i686.
It looks like this change is not part of LLD 3.9.0rc1. Would it make sense to merge this into the release branch?
Disregard that. That was with an older version of Clang that generated such .o files (r269026). The output generated by Clang 3.9.0rc1 doesn't trigger such an error from LLD.