This is the mail archive of the binutils@sourceware.org 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]

Omit output section from executable


Hi all,

For an OS kernel I have put all CPU-local data in a specific ELF section named
".cpulocal". During bootstrap the kernel allocates a memory page for each CPU
and maps it to the VMA of the ".cpulocal" section.

I would like the linker to omit the (useless) contents of that section from the
executable while still maintaining references into the section. I can achieve
the desired effect by doing an objcopy -R .cpulocal after the final link.

Any way I could do the same with only a linker script and without the objcopy?

Thanks

	- Udo


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