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]

Re: [uClinux-dev] XIP on an ARM processor (R_ARM_GOTOFF32)

On 6/27/06, Erwin Authried <> wrote:

which compiler/binutil version did you use? Could you post the source
that you used?
One other thing (although that doesn't seem to have to do with your
problem): It is important that you use -fpic (not -fPIC) so that the
correct multilib library is used. For the same reason, -fpic must be
specified in CFLAGS as well as in LDFLAGS if you use a Makefile.


Hello Erwin,

The source is simply...

int main() { puts("Hello, world!"); return 0; }

I'm using binutils 2.17 and gcc 4.1.1.

The issue-raising difference is that I attempted to place .rodata
after the .text semgent in flash, rather than with the .data segment
in RAM. This should work, except that GCC is creating GOT-relative
references to the symbols in .rodata rather than PC-relative
references. The GOT-relative reference does not work if the .rodata
symbol is with the .text segment instead of with the .data segment.


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