[PATCH] D120045: [lld][ELF] support nested special directives in output sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 12:32:33 PST 2022


MaskRay added a comment.

In D120045#3330497 <https://reviews.llvm.org/D120045#3330497>, @bluca wrote:

> All of that has been answered multiple times already, and I have no intention of wasting any more time on it given you are not willing to listen, nor to understand what it means to ship a distribution. I made a final good faith attempt, and put my unpaid time to work for the benefit of google, by testing and providing this patch, and by showing I am willing to adapt the setup to work around these compatibility bugs of LLVM. The ball now is your court - either fix the problems, using the provided patch or an equivalent (not looking for credit or anything), and then we can make it work, or don't, and keep LLVM incompatible with the default setup of any project which uses the package note specification. The choice is yours.

When you said "If you have an alternative solution to make a linker script create a read-only note section to be inserted after another section we'd love to hear it. So far we haven't found any, but it's possible we missed something, of course.",
i'd love to hear which package doesn't work this way.
Rui Ueyama feels strange (a linker script solution won't work with mold). Cary Coutant may be annoyed by (the .note* = SHT_NOTE thing) (gold doesn't have it, like ld.lld).
Adhemerval Zanella and Andrew Kelly may feel strange, too.

And why `READONLY` is needed is never explained. You said:

> If you have an alternative solution to make a linker script create a read-only note section

Well, just don't use `(READONLY)`. The section is readonly even without `(READONLY)`. Alan's 2020 binutils fix is sufficient. If not, open a new bug on binutils. Don't add more stuff to READONLY.

> "work for the benefit of google"

Google doesn't use the feature. I added the `(TYPE=...)` syntax for the sole purpose that Fedora or systemd (https://github.com/systemd/package-notes) has a proper way to mark `.note*` sections `SHT_NOTE`.
If one llvm-project commit of mine can benefit my company, I can argue it's my work; otherwise it's not. Maintaining lld/ELF is unpaid.
I have a ton of internal work. Perhaps 90+% of my llvm-project commits are entirely unrelated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120045/new/

https://reviews.llvm.org/D120045



More information about the llvm-commits mailing list