Re: Position-independent linker script symbols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Luke Trowbridge" <ltrowbridge@xxxxxxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux