[PATCH] D118491: [lld][ELF] support READONLY in linker script section

Luca Boccassi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 15:01:28 PST 2022


bluca added a comment.

In D118491#3280927 <https://reviews.llvm.org/D118491#3280927>, @MaskRay wrote:

>> bfd recently added a READONLY attribute for sections, as they are created writable by default.
>
> I think saying it writable is incorrect (see https://sourceware.org/bugzilla/show_bug.cgi?id=26378). See https://sourceware.org/pipermail/binutils/2021-May/116579.html
>
> I mentioned that `READONLY` is not needed but it seems that my comment has been ignored.

There might be cases/combination where that is not the case, but with the provided linker script, before that patch, the note section was definitely created as writable by bfd, and there was no way to mark it read-only from the script.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118491



More information about the llvm-commits mailing list