Defining a section that isn't file-backed

Ian Lance Taylor ian@wasabisystems.com
Thu Feb 26 00:28:00 GMT 2004


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



More information about the Binutils mailing list