This is the mail archive of the
mailing list for the GCC project.
[ARM/Thumb] Problem and question with PIC option?
- From: "Thierry COLIN" <thierry dot colin at thales-e-transactions dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 14 May 2002 09:44:52 +0100
- Subject: [ARM/Thumb] Problem and question with PIC option?
- Organization: THALES e-TRANSACTIONS SA
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