confused kernel compressed code link address

Arun KS getarunks at gmail.com
Mon May 12 02:06:17 EDT 2014


Hi Chuck Huang,

On Thu, May 8, 2014 at 5:25 PM, Chuck Huang <chuck.kernel at gmail.com> wrote:
> Dear all,
>
> Now i am looking into kernel decompressed code, arch/arm/boot/compressed/head.S
>
> As i objdump arch/arm/boot/compressed/vmlinux, the start section address is 0x0.
>
> vmlinux.S
> 373789| Disassembly of section .text:
> 373790|
> 373791| 00000000 <start>:
> 373792| #endif
>
> if the code run in 0x8000 0000(which is DDR base address), but the
> link address is zero, how it works ?

The compressed/head.S code is position independent code. It can be
loaded anywhere in RAM.
There will not be reference to any labels directly. All the address
references are done relative to PC.

Thanks,
Arun
>
> best regards
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



More information about the Kernelnewbies mailing list