Attention is currently required from: Angel Pons, Arthur Heymans.
Nico Huber has posted comments on this change by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/84043?usp=email )
Change subject: util/cbfstool: Deal with how lld organizes loadable segments ......................................................................
Patch Set 7:
(1 comment)
File util/cbfstool/cbfs-mkstage.c:
https://review.coreboot.org/c/coreboot/+/84043/comment/c8903520_d6bd3466?usp... : PS7, Line 301: prev = cur The whole loop looks suspicious. Unconditionally setting `prev` means we potentially run the comparison against segments `!= PT_LOAD`, right?
Could we do something like checking `!(.p_flags & PF_X)` and only update `prev` if `cur` is a loadable, not executable segment? That should avoid the special lld case, I guess. (all assuming that `PF_X` is set as one would expect)
Also, given that we are about to make an XIP assumption either way, we should rename the function.