[ELF] Update flag propagation rule to ignore discarded output sections
See the updated insert-before.test for the effects: many synthetic sections are SHF_ALLOC|SHF_WRITE. If they are discarded, we don't want to propagate their flags to subsequent output section descriptions. `getFirstInputSection(sec) == nullptr` can technically be merged into `isDiscardable` but I'd like to postpone that as not sharing code may give more refactoring opportunity. Depends on D118529. Reviewed By: peter.smith, bluca Differential Revision: https://reviews.llvm.org/D118530
Loading
Please sign in to comment