[xen staging] xen/libfdt: Put all libfdt in init

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] xen/libfdt: Put all libfdt in init

patchbot
commit 9ba1f198f61e923295afe13662e7bd219f7f4077
Author:     Julien Grall <[hidden email]>
AuthorDate: Mon Jul 2 17:19:09 2018 +0100
Commit:     Stefano Stabellini <[hidden email]>
CommitDate: Wed Jul 11 12:22:17 2018 -0700

    xen/libfdt: Put all libfdt in init
   
    Libfdt is used for:
        - Unflatten the Flatten Device-Tree (FDT) blob
        - Create Device-Tree for the Hardware-Domain
   
    Both use are done during the initialization of Xen. So move all the
    libfdt to init.
   
    Note that the runes was borrowed from libelf Makefile.
   
    Signed-off-by: Julien Grall <[hidden email]>
    Reviewed-by: Stefano Stabellini <[hidden email]>
---
 xen/common/libfdt/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile
index 7578fe9c50..d81f54b6b8 100644
--- a/xen/common/libfdt/Makefile
+++ b/xen/common/libfdt/Makefile
@@ -1,5 +1,13 @@
 include Makefile.libfdt
 
-obj-y += $(LIBFDT_OBJS)
+SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
+
+obj-y += libfdt.o
 
 CFLAGS += -I$(BASEDIR)/include/xen/libfdt/
+
+libfdt.o: libfdt-temp.o Makefile
+ $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@
+
+libfdt-temp.o: $(LIBFDT_OBJS)
+ $(LD) $(LDFLAGS) -r -o $@ $^
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog