This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Creating a NOLOAD section with contents
- From: Will Newton <will dot newton at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 28 May 2010 15:27:10 +0100
- Subject: Creating a NOLOAD section with contents
Hi all,
Is it possible to create a code section as part of an ELF that has
contents but is not loadable?
I tried this in my linker script:
.my_funcs 0x80000000 (NOLOAD) :
{
*(.my_funcs)
}
Which creates a .my_funcs in the output ELF that is not loadable, but
it also has no contents (ALLOC, READONLY, CODE) whereas I would like a
section that was (CONTENTS, READONLY, CODE).
Is there a simple way to do that?
Thanks,