We want to avoid having arbitrary data in the executable segment. LLD already fills the space between sections with non-executable instruction padding, but doesn't currently fill the tail of the segment which this patch addresses.
This is especially important when the code segment is the last segment. In that case it should be aligned to the page boundary to avoid loading the non-segment parts of the ELF file at the end of the file.
Reverse the order.