On 6/27/06, Erwin Authried <[EMAIL PROTECTED]> wrote:
Hi,
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.
Regards,
Erwin
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.
Cheers,
Shaun