Creating a NOLOAD section with contents

Will Newton will.newton@gmail.com
Fri May 28 14:27:00 GMT 2010


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,



More information about the Binutils mailing list