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]

Reg initializing data in segments other than .data


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.



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