[lld] [lld][ELF] Introduce an option to keep data section prefix. (PR #148985)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 26 16:01:50 PDT 2025


MaskRay wrote:

> From a patch organization perspective, it would be clearer to first introduce the option in a patch and then add RELRO semantics in a follow-up patch (https://github.com/llvm/llvm-project/pull/148920). While it's unusual that 148920 was merged first, the changes remain on the right track...
>
>> I appreciate you bringing up the merge order and agree with it. I've opted to merge https://github.com/llvm/llvm-project/pull/148920 first because linker script is an alternative option to this patch, and https://github.com/llvm/llvm-project/pull/148920 is on the common path of either linker script or section grouping.

The merged change, approved by someone probably unfamiliar with LLD, was the exact case I mentioned to lenary the day before. I had to rename the incorrect file from `keep-text-section-prefix.s` (when the option is actually `keep-data-section-prefix`), and now the tests require significant adjustments, which will clutter the commit history....

> In the past, changes to areas I care about, like lld and MC, were sometimes approved and landed before their implications were fully thought through, requiring me to revise them later.

https://github.com/llvm/llvm-project/pull/148985


More information about the llvm-commits mailing list