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

[Minios-devel] [UNIKRAFT PATCH v3 3/4] plat/*: Move ctortab before rodata on all platforms


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Thu, 29 Aug 2019 16:19:39 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X0fZz41b3J6iZU8kHh5jbtUKPv/mmA1BMRS38wkko+w=; b=kdfWWFRda64WmT9UwMKBWC3aJ78f41Q/NWb0vpwzopo3CR3NbayyN5hIJKzUTZ5OJJkd7TiaU1QY/TDYSNPAPEEeBOg9/QRtNiGByMkJSasIIn2Mg0CM/CLB7aEj1Nw5Yei5udoUts5BelG7eVQf5JmEY1N0WzCXFcUUbmc96vPq5LXfovpEDhlo1l2RPxOif1Umk0hppt6Ysv0UYiVvHBbT/qLKB+Ujkz1SvDigHP/tWQOqYBujsnH0VvPItSqfvOcOCtKxs6fzpU2O0k3wW2jymYazN3vV55i600cScOH8REaNco5cBbxbwy7YnIv8AaaaTicXJMX/w0tvHrizYA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e7L0j4eH1A4In6YKJz7kJ4CcbnCfQf/THfnepBYCVFHYn6tbrFEJtPBW48SIa6KXnQRR3PmnGOcvMCup5gXtkQOftqM4QrXgudJGReI9E9G+hSJGb48GOt10FPZOQcvfFmAf9QlxtnI2tlMLN/SOzAZ+aiPOTgKDCL+5CLOnFfKR52BtJLLDxYV4AIBrgtbERJ6sw2DA5VYu1LxQ8gXmxXEJv5UMBxxJ6SrqzDFCt3MZUVnp9VinGrGJNrhFJLifqIoEJxVdFB3yGgPahxPtijdkEgcH9Dzd5aWkby62PMykJL6aNKdTtXqIuIP+eurVTkBrJcJ68bx992VWaJT5bQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "simon.kuenzer@xxxxxxxxx" <simon.kuenzer@xxxxxxxxx>, Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 29 Aug 2019 16:19:49 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVXoWOhH2M9csnlU2SyJkDl6i+pA==
  • Thread-topic: [UNIKRAFT PATCH v3 3/4] plat/*: Move ctortab before rodata on all platforms

From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

In order to be consistent in the linker scripts we move the ctortab section
before rodata section on all platforms.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 plat/kvm/arm/link64.lds.S    | 5 +++--
 plat/linuxu/arm/link.lds.S   | 2 +-
 plat/linuxu/x86/link64.lds.S | 2 +-
 plat/xen/arm/link32.lds.S    | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/plat/kvm/arm/link64.lds.S b/plat/kvm/arm/link64.lds.S
index d08abe48..b07a8979 100644
--- a/plat/kvm/arm/link64.lds.S
+++ b/plat/kvm/arm/link64.lds.S
@@ -71,7 +71,10 @@ SECTIONS {
 
        EXCEPTION_SECTIONS
 
+       CTORTAB_SECTION
+
        /* Read-only data */
+       . = ALIGN(__PAGE_SIZE);
        _rodata = .;
        .rodata :
        {
@@ -82,8 +85,6 @@ SECTIONS {
 
        _erodata = .;
 
-       CTORTAB_SECTION
-
        /* Constructor tables (read-only) */
        . = ALIGN(0x8);
        _ctors = .;
diff --git a/plat/linuxu/arm/link.lds.S b/plat/linuxu/arm/link.lds.S
index 8a731c5c..5c9a4f3c 100644
--- a/plat/linuxu/arm/link.lds.S
+++ b/plat/linuxu/arm/link.lds.S
@@ -4,4 +4,4 @@ SECTIONS
 {
        CTORTAB_SECTION
 }
-INSERT AFTER .rodata
+INSERT BEFORE .rodata
diff --git a/plat/linuxu/x86/link64.lds.S b/plat/linuxu/x86/link64.lds.S
index b6f581ce..a6a56ad2 100644
--- a/plat/linuxu/x86/link64.lds.S
+++ b/plat/linuxu/x86/link64.lds.S
@@ -6,7 +6,7 @@ SECTIONS
 
        CTORTAB_SECTION
 }
-INSERT AFTER .rodata
+INSERT BEFORE .rodata
 
 SECTIONS
 {
diff --git a/plat/xen/arm/link32.lds.S b/plat/xen/arm/link32.lds.S
index cade70a1..3737d1cc 100644
--- a/plat/xen/arm/link32.lds.S
+++ b/plat/xen/arm/link32.lds.S
@@ -51,6 +51,8 @@ SECTIONS
 
        EXCEPTION_SECTIONS
 
+       CTORTAB_SECTION
+
        /* Read-only data */
        _rodata = .;
        .rodata :
@@ -61,8 +63,6 @@ SECTIONS
        . = ALIGN(__PAGE_SIZE);
        _erodata = .;
 
-       CTORTAB_SECTION
-
        . = ALIGN(0x8);
        _ctors = .;
        .preinit_array : {
-- 
2.20.1

_______________________________________________
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®.