This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: crossgcc: arbitrary sections?


>
>So what is the method?  Do gnu ld linker scripts allow you to identify 
>a chunk of object code by the module name (name of .o file) together
>with the names of the sections that are present in that file, so that
>you could take the data section of foo.o and put it one place, but put 
>the data section of bar.o in another place, yet let the text sections
>of both coallesce into a single code space?

Yes.  You use the SECTIONS directive in the GNU linker script.
The GNU linker script appears to be based on the Unix S5R3
linker scripts.  You can basically take any section output by
a compiler to a specific object module and place it in any
named output section you wish to create.

Art