This is the mail archive of the gcc-help@gcc.gnu.org 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] |
-------------------------------------------------- From: "Ian Lance Taylor" <iant@google.com> Sent: Wednesday, July 14, 2010 6:43 AM To: "Luke Trowbridge" <ltrowbridge@electrodata.com> Cc: <gcc-help@gcc.gnu.org> Subject: Re: Position-independent linker script symbols
"Luke Trowbridge" <ltrowbridge@electrodata.com> writes:
The following code is produced: a0000000 <main>: a0000000: e59f300c ldr r3, [pc, #12] ; a0000014 <__rodata_start__+0x14> a0000004: e08f3003 add r3, pc, r3 a0000008: e59f2008 ldr r2, [pc, #8] ; a0000018 <__rodata_start__+0x18> a000000c: e7930002 ldr r0, [r3, r2] a0000010: e12fff1e bx lr a0000014: 00000010 .word 0x00000010 a0000018: 00000000 .word 0x00000000
As I understand, this will return 0, instead of the expected 0xA0000000.
Are you looking at the final linked executable? I would expect there to be a relocation on the address at 0xa000018. If it is fully linked, look at the dynamic relocations.
Ian
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |