bfd: unify header generation rules

The logic between these rules are extremely similar, so unify them
into a single variable.
2 files changed