diff mbox

[v2,2/4] gcov: collect more sections to constructor list

Message ID 1473165667-25707-3-git-send-email-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Sept. 6, 2016, 12:41 p.m. UTC
The version of gcc (4.9.2) I use put constructors into .init_array*
section(s). Collect those sections into constructor list as well.

Modify both arm and x86 scripts to keep them in sync.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
---
v2: move .init_arry before .init_array.*

Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/arm/xen.lds.S | 2 ++
 xen/arch/x86/xen.lds.S | 2 ++
 2 files changed, 4 insertions(+)

Comments

Jan Beulich Sept. 6, 2016, 1:35 p.m. UTC | #1
>>> On 06.09.16 at 14:41, <wei.liu2@citrix.com> wrote:
> The version of gcc (4.9.2) I use put constructors into .init_array*
> section(s). Collect those sections into constructor list as well.
> 
> Modify both arm and x86 scripts to keep them in sync.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Acked-by: Julien Grall <julien.grall@arm.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox

Patch

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index b24e93b..3c5e7ba 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -166,7 +166,9 @@  SECTIONS
 
        . = ALIGN(8);
        __ctors_start = .;
+       *(.ctors)
        *(.init_array)
+       *(SORT(.init_array.*))
        __ctors_end = .;
   } :text
   __init_end_efi = .;
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 67cfda1..d903c31 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -205,6 +205,8 @@  SECTIONS
        . = ALIGN(8);
        __ctors_start = .;
        *(.ctors)
+       *(.init_array)
+       *(SORT(.init_array.*))
        __ctors_end = .;
   } :text