[PATCH v2] ld: add READONLY attribute for SECTIONS
Fangrui Song
i@maskray.me
Sun Jul 25 00:04:40 GMT 2021
On 2021-07-21, Nick Clifton via Binutils wrote:
>Hi Luce,
>
>>Allows linker scripts to set the SEC_READONLY flag
>
>Patch approved and applied.
>
>Cheers
> Nick
>
My question persists as of why READONLY is needed
https://sourceware.org/pipermail/binutils/2021-May/116579.html
SECTIONS
{
.note.package : ALIGN(4) {
BYTE(0x04) BYTE(0x00) BYTE(0x00) BYTE(0x00)
}
} INSERT AFTER .note.gnu.build-id;
ld-new a.o -T a.lds --build-id -o a
.note.package doesn't have the SHF_WRITE flag. No need for READONLY.
More information about the Binutils
mailing list