How to place code in a different section than .text

Labermeier Norbert norbert.labermeier@siemens.com
Thu Jan 20 13:11:00 GMT 2005


Hi,

I'd like to place a part of my Code, let us say the content of one
C-File in a different section than .text. 
Also I like to have a special location for the .data and .bss.

Ok, on a embedded target I can specify the sections in the linker
script, e.g.

.new_text
.new_data
.new_bss

But how does it work for compilation, which option did I have to use to
tell the compiler that he should mark the output for different location.

I will also have the rest of my code in a
.text
.data
.bss

Does anybody has an idea?

Best regards,

Norbert



More information about the Gcc-help mailing list