With little code reordering it is possible to make
removeEmptyCommands to be private. Does not seem
it worth to allow it leak to public interface and also
simplifies code a bit.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
It's for case from orphan-phdrs.s test:
PHDRS { exec PT_LOAD FLAGS(0x4 | 0x1); rw PT_LOAD FLAGS(0x4 | 0x2); } SECTIONS { .text : { *(.text) } :exec .empty : { *(.empty) } :rw .rw : { *(.rw) } }
if we have no .empty input sections, this command will be removed from output,
though we still want to assign output section .rw to rw PT_LOAD.
So we want to remove empty commands after sections are assigned to headers and not before.
Comment Actions
Not sure what exactly changed, but this one breaks 276 tests now. Will revisit it later.