This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PE known sections having certain flags enforced


Hi Nick,

back in 2003 you've changed bfd/peXXigen.c's
_bfd_XXi_swap_scnhdr_out() to force certain flags for known
sections. Considering the function this lives in, the change appears
to make it impossible to create binaries with flags varying from the
ones being enforced there, as even objcopy would come through
that path. As per
https://lists.xenproject.org/archives/html/xen-devel/2017-09/msg02485.html
we've found a need to produce .reloc sections without the
discardable flag set, as the Xen image itself re-uses the relocation
tables to relocate itself a second time after having been loaded by
the UEFI loader.

Do you have any suggestion how to achieve this without creating
a custom tool to effect the change, and also without renaming the
section (since, as sad as it is, it's likely not just binutils to imply
section purpose from section name)?

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]