This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Reg initializing data in segments other than .data
- From: Prasad Venkata Boddupalli <bprasad at CS dot Arizona dot EDU>
- To: binutils at sources dot redhat dot com
- Date: Thu, 5 Jan 2006 15:33:53 -0700 (MST)
- Subject: Reg initializing data in segments other than .data
- References: <20051227030809.GC2770@bubble.grove.modra.org>
Hello,
In my linker script, there is a section '.shared_section', in which
variables that need to be shared across multiple processors go. That
section becomes '.shared_segment' in the elf executable. So, the linker
script looks as follows:
...
.shared_segment 0x80800000 : {
*(.shared_section)
}
Variables defined in '.shared_section' should be able to be initialized.
That is '.shared_segment' should have the same semantics as the 'data'
segment.
Is there any way of specifying attributes to that segment in the linker
script so that linker actually copies the corresponding values of
variables to the elf executable ? It would be preferable not to push the
'shared_section' into 'data' segment.
regards,
Prasad.