[PATCH v2 13/28] binman: Move section-building code into a function