This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: How to rename data and bss sections for powerpc-eabi?


On Thu, 13 Mar 2003 reinhard dot jessich at telering dot at wrote:

> If you reply to this mail, please reply to all, so that I get the answer in the
> company, too (thanks).
> 
> Hello,
> 
> I add simple process support to an existing operating system. The operating
> system is staticaly linked with the application.
> 
> To separate the kernel data from the processes data I need to know which data
> is kernel data and which is process data.
> Currenly the linker puts the global kernel and global appliation (process) data
> together in the .data, .bss and other sections.
> 
> I don't like to map the kernel data RW for the application, but on the other
> hand I would like to have global data for the application, too.
> 
> My idea is to rename the .data, .bss and other segments during the compilation
> of the kernel sources. Then I would be able to put them on different addresses
> by the linker and I could map them only readable by the application
> (processes).

You are using a brute-force approach.

The right approach is probably to write a new linker script and remap
either the kernel data or the user data into a new section by performing a
partial link.

> It would be possible to define all kernel variables with the section attribute,
> but this is a lot of work. I found the -mdata option for the arc target. But
> powerpc-eabi doesn't support such a feature.
> 
> Is there any other possibility to achive what I need?
> If not, I think I am able to add the -mdata and similar options for
> powerpc-eabi. Is there somebody interested to support me, so that this new
> options may be added permanently to a future version of gcc?
> 
> Best Regards,
>     Reinhard

Toshi



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