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] |
Ive got a cross compiler for the powerpc-eabi hosted on under sunos. I am trying to build a rom image that when loaded to the bootprom will move its data sections to ram. I have compiled all source files with -mrelocatable-lib (not sure if this flag directly relates to what Im trying to accomplish). For testing purposes I have been trying to relocate the .sdata section by using the following line in my linker file. .sdata 0x10000 : AT (0x50000) { *(*.sdata) } My understanding of what this line means is the following. .sdata will be put at address 0x10000 in the rom image but all references to this area (by code) will point to address offset 0x50000. My code would then be responsible for copying this data from rom address to 0x10000 out to ram address 0x50000. The map file indicates that all variables in this section as being from offset 0x10000 but it also says that the sections load area is at 0x50000. When looking at the code from the debugger all references to variables from this section seem to be from 0x10000 and not the expected 0x50000. When looking at the assembly the relocatable code seems to be getting the offset of the .sdata section from an offset of the value returned by the ld register. It just seems that the offset 0x50000 is not being put there. I have sifted through all the documentation for the linker file and gcc options at the Cygnus site and still seem to be stuck. Are my assumptions on how the AT tag work correct? Is the -mrelocatable-lib flag supposed to be helping me with relocating this section? Is there another way? Any help would be greatly appreciated, Thanks, Vaughan _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com