This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Defining a section that isn't file-backed


Hi,

I'd like to use a linker script to define an ELF section that isn't backed
by disk space in the resulting binary, that I can place at a specific
absolute address in memory.

By "not backed" I mean something a bit like the BSS where the section
could be (say) 256mb but only take up a few bytes on disk. If the
resulting section is assigned to a read-only VMA range, then I think
the result should be equivalent to a MAP_NORESERVE | MAP_FIXED mmap before
the dynamic linker runs - am I correct?

If this is possible, what sort of script would I be looking for?
Alternatively which part of the ld manual describes how to do it, as I've
looked and not been able to find any info on this.

thanks -mike



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]