On Fri, Dec 22, 2017 at 03:44:26PM +0800, Andes wrote:

> From: Rick Chen <r...@andestech.com>
> 
> Add prelink-riscv to arrange .rela.dyn and .rela.got
> in compile time.
> 
> Signed-off-by: Rick Chen <r...@andestech.com>
> Signed-off-by: Rick Chen <rickche...@gmail.com>
> Signed-off-by: Greentime Hu <green...@gmail.com>
> ---
>  Makefile                |    4 ++
>  tools/Makefile          |    1 +
>  tools/prelink-riscv.c   |   91 ++++++++++++++++++++++++++++++++++++++++++
>  tools/prelink-riscv.inc |  101 
> +++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 197 insertions(+), 0 deletions(-)
>  create mode 100644 tools/prelink-riscv.c
>  create mode 100644 tools/prelink-riscv.inc
> 
> diff --git a/Makefile b/Makefile
> index c573ddb..bb6416f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1264,6 +1264,10 @@ ifeq ($(CONFIG_KALLSYMS),y)
>       $(call cmd,u-boot__) common/system_map.o
>  endif
>  
> +ifeq ($(CONFIG_RISCV),y)
> +     @tools/prelink-riscv $@ 0
> +endif
> +
>  quiet_cmd_sym ?= SYM     $@
>        cmd_sym ?= $(OBJDUMP) -t $< > $@
>  u-boot.sym: u-boot FORCE
> diff --git a/tools/Makefile b/tools/Makefile
> index 4d32fe5..571f571 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -185,6 +185,7 @@ hostprogs-$(CONFIG_KIRKWOOD) += kwboot
>  hostprogs-$(CONFIG_ARCH_MVEBU) += kwboot
>  hostprogs-y += proftool
>  hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela
> +hostprogs-$(CONFIG_RISCV) += prelink-riscv
>  
>  hostprogs-y += fdtgrep
>  fdtgrep-objs += $(LIBFDT_OBJS) fdtgrep.o
> diff --git a/tools/prelink-riscv.c b/tools/prelink-riscv.c
> new file mode 100644
> index 0000000..dd099a9
> --- /dev/null
> +++ b/tools/prelink-riscv.c
> @@ -0,0 +1,91 @@
> +#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
> +#error "Only little-endian host is supported"
> +#endif
[snip]
> diff --git a/tools/prelink-riscv.inc b/tools/prelink-riscv.inc
> new file mode 100644
> index 0000000..f7f9596
> --- /dev/null
> +++ b/tools/prelink-riscv.inc

Needs license information, thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to