Linkers may place SHF_X86_64_LARGE sections away from regular sections to alleviate relocation overflow pressure [1]. It would be nice to have the ability to add the SHF_X86_64_LARGE flag to sections in relocatable object files, especially for prebuilt object files that the user cannot control. I suggest that we allow objcopy --set-section-flags .data=alloc,large to set SHF_X86_64_LARGE. [1]: https://maskray.me/blog/2023-05-14-relocation-overflow-and-code-models
Patch: https://sourceware.org/pipermail/binutils/2023-June/128052.html
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5e24da908dbf6ddeb03e2b194f6b39dea3c660f3 Used PATCH v4 with a modification: https://sourceware.org/pipermail/binutils/2023-July/128334.html This is a minor feature, so I do not rush it into the upcoming binutils 2.41 release. Possible target milestone: binutils 2.42