This adds two new options to match GNU objcopy:
--gap-fill is used to fill gaps between two adjacent loadable sections with a specified 8 bit value.
--pad-to will pad the last loadable section to the pad-to address with the value specified by --gap-fill if present or zero by default.
Overview of how this works in llvm-objcopy:
- Resize all the segments if needed.
- Adjust section/segment layout (i.e. file offset) due to overlap across sections in the same segment or overlap across segments.
- Set the parent segment's content.
- Set the segment child's content.
- Set the section's content.
Presumably you meant bytes, not bits?