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

Re: [Minios-devel] [UNIKRAFT PATCH v2 3/4] plat/*: Support .uk_inittab_ section



Looks good.

Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 23.09.19 14:09, Sharan Santhanam wrote:
The platform linker script create a single section that accumulate all
the init function belonging to a specific section.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
  plat/common/include/common.lds.h | 8 ++++++++
  plat/kvm/arm/link64.lds.S        | 2 ++
  plat/kvm/x86/link64.lds.S        | 2 ++
  plat/linuxu/arm/link.lds.S       | 2 ++
  plat/linuxu/x86/link64.lds.S     | 2 ++
  plat/xen/arm/link32.lds.S        | 2 ++
  plat/xen/x86/link64.lds.S        | 2 ++
  7 files changed, 20 insertions(+)

diff --git a/plat/common/include/common.lds.h b/plat/common/include/common.lds.h
index b06dd96..958be1e 100644
--- a/plat/common/include/common.lds.h
+++ b/plat/common/include/common.lds.h
@@ -94,6 +94,14 @@
        }                                                               \
        uk_ctortab_end = .;
+#define INITTAB_SECTION \
+       uk_inittab_start = .;                                           \
+       .uk_inittab :                                                   \
+       {                                                               \
+               KEEP(*(SORT_BY_NAME(.uk_inittab_[1-6][0-9])))           \
+       }                                                               \
+       uk_inittab_end = .;
+
  #define TLS_SECTIONS                                                  \
        . = ALIGN(0x8);                                                 \
        _tls_start = .;                                                 \
diff --git a/plat/kvm/arm/link64.lds.S b/plat/kvm/arm/link64.lds.S
index b07a897..8fe3ad8 100644
--- a/plat/kvm/arm/link64.lds.S
+++ b/plat/kvm/arm/link64.lds.S
@@ -73,6 +73,8 @@ SECTIONS {
CTORTAB_SECTION + INITTAB_SECTION
+
        /* Read-only data */
        . = ALIGN(__PAGE_SIZE);
        _rodata = .;
diff --git a/plat/kvm/x86/link64.lds.S b/plat/kvm/x86/link64.lds.S
index 6103fc2..1f66104 100644
--- a/plat/kvm/x86/link64.lds.S
+++ b/plat/kvm/x86/link64.lds.S
@@ -48,6 +48,8 @@ SECTIONS
CTORTAB_SECTION + INITTAB_SECTION
+
        /* Read-only data */
        . = ALIGN(__PAGE_SIZE);
        _rodata = .;
diff --git a/plat/linuxu/arm/link.lds.S b/plat/linuxu/arm/link.lds.S
index 5c9a4f3..f20cc7c 100644
--- a/plat/linuxu/arm/link.lds.S
+++ b/plat/linuxu/arm/link.lds.S
@@ -3,5 +3,7 @@
  SECTIONS
  {
        CTORTAB_SECTION
+
+       INITTAB_SECTION
  }
  INSERT BEFORE .rodata
diff --git a/plat/linuxu/x86/link64.lds.S b/plat/linuxu/x86/link64.lds.S
index a6a56ad..8012008 100644
--- a/plat/linuxu/x86/link64.lds.S
+++ b/plat/linuxu/x86/link64.lds.S
@@ -5,6 +5,8 @@ SECTIONS
        EXCEPTION_SECTIONS
CTORTAB_SECTION
+
+       INITTAB_SECTION
  }
  INSERT BEFORE .rodata
diff --git a/plat/xen/arm/link32.lds.S b/plat/xen/arm/link32.lds.S
index 3737d1c..30c29ab 100644
--- a/plat/xen/arm/link32.lds.S
+++ b/plat/xen/arm/link32.lds.S
@@ -53,6 +53,8 @@ SECTIONS
CTORTAB_SECTION + INITTAB_SECTION
+
        /* Read-only data */
        _rodata = .;
        .rodata :
diff --git a/plat/xen/x86/link64.lds.S b/plat/xen/x86/link64.lds.S
index f7e53fe..3e16b3b 100644
--- a/plat/xen/x86/link64.lds.S
+++ b/plat/xen/x86/link64.lds.S
@@ -46,6 +46,8 @@ SECTIONS
CTORTAB_SECTION + INITTAB_SECTION
+
        _rodata = .;
        .rodata : {
                *(.rodata)


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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