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

Re: [Xen-devel] [PATCH RFC 06/25] libelf-loader: introduce elf_load_image and CONFIG_KERNEL_NO_RELOC



>>> On 06.12.11 at 19:19, <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> @@ -265,7 +278,11 @@ void elf_load_binary(struct elf_binary *elf)
>  
>  void *elf_get_ptr(struct elf_binary *elf, unsigned long addr)
>  {
> +#ifdef CONFIG_KERNEL_NO_RELOC
> +    return elf->dest + addr;

This looks more like a workaround than a proper solution. Kernels on x86
may not support relocation either (classic Xen kernels certainly don't),
yet this construct isn't needed.

Jan

> +#else
>      return elf->dest + addr - elf->pstart;
> +#endif
>  }
>  
>  uint64_t elf_lookup_addr(struct elf_binary * elf, const char *symbol)





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.