This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Defining a section that isn't file-backed
Mike Hearn <mike@theoretic.com> writes:
> I've read the gas manual and it looks like the only section flags in ELF
> binaries do not allow you to mark a section as being mapped readonly.
> Please tell me this isn't the case! I'm sure it must be wrong, as there
> are sections that are clearly being mmaped with (PROT_READ), I just
> can't see how it's done.
ELF sections created using the assembler .section pseudo-op are
read-only by default. They only acquire the write flag if you specify
it explicitly.
Ian