HA: [lld] r256141 - [ELF] - Fixed padding for CIE/FDE entries of .eh_frame section
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 25 01:44:49 PST 2015
>Alignment in .eh_frame is quite nasty :-(
>The alignment requirement shouldn't need to be to a pointer size. For
>example, a 4 byte offset is normally used on x86_64.
>When using a linker that just concatenates the .eh_frame sections, the
>producer has to be careful to make the size *of the entire section* a
>multiple of the pointer size. This is because some other file might
>have an .eh_frame with an alignment of 8 and the zero padding would be
>read as a terminator.
>A side effect of making the section a multiple of 8 is that both MC as
>GAS give it an alignment of 8. With that it becomes non trivial for
>the linker to know the alignment requirements of each cie/fde and it
>has to overcompensate.
I think i get the idea, thanks for explanation.
>I fixed a missed case in r256392: the CIE size was not updated.
Thanks, I missed it by accident :/
>Probably by now it is safe for MC to assume every linker processes
>.eh_frame. With that it could produce .eh_frame sections with an
>alignment of 4 and we could remember the alignment of each cie/fde to
>produce a more compact result. (I will open a bug).
More information about the llvm-commits