This is the mail archive of the 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]

[ARM/Thumb] Problem and question with PIC option?


I am using GCC 3.1 (pre-release) under Cygwin environment. I would like 
to create outputs for ARM processors so I have built gcc for ARM target.
I create a simple project with some files.
I use these options :
-mthumb : because I need a thumb compatible output

The file created with these options is correct and It woks 'good' with 
the simulator but I have noted a strange aspect of the pic option.
In fact, The file use the relative address to access to variables but, 
in my files, I am using const string which are placed in the 'rodata' 
sections (for exemple fprintf("coucou");).
When I move all the code (not the data because I don't need this section 
for the moment and no information are stored in this section...) and I 
load my application in another address, when the file try to access to 
the string variable in the rodata section, It access to the GOT section 
with relative address but in this section, the PHYSICAL address is 
present....!!!! and so in the register is present the 'bad' address...

I don't understood why It couldn't access to this section with relative 
address and not by the got

I would like that these rodata are placed in text section to access only 
with relative address and no physical one.
Could someone help me and answer me.

Thanks and regards


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