From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 22 Dec 2017 10:31:28 -0500 Subject: [U-Boot] [PATCH 09/12] risck: tools: Prelink u-boot In-Reply-To: <1513928669-9210-9-git-send-email-uboot@andestech.com> References: <1513928669-9210-1-git-send-email-uboot@andestech.com> <1513928669-9210-9-git-send-email-uboot@andestech.com> Message-ID: <20171222153128.GO7592@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Dec 22, 2017 at 03:44:26PM +0800, Andes wrote: > From: Rick Chen > > Add prelink-riscv to arrange .rela.dyn and .rela.got > in compile time. > > Signed-off-by: Rick Chen > Signed-off-by: Rick Chen > Signed-off-by: Greentime Hu > --- > 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: