aboutsummaryrefslogtreecommitdiff
path: root/skiboot.lds.S
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:11:44 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-15 07:59:18 +1000
commite8782725c718875eab9764812c640bcb5002eacd (patch)
tree62e79ddb8c5cf4e98a95d18e0bd6deea2a9bf47d /skiboot.lds.S
parent2b9fdc7a27b2199830dd9f245eff92d506cc9bf9 (diff)
downloadskiboot-e8782725c718875eab9764812c640bcb5002eacd.zip
skiboot-e8782725c718875eab9764812c640bcb5002eacd.tar.gz
skiboot-e8782725c718875eab9764812c640bcb5002eacd.tar.bz2
Run gcc constructors
As part of setting up GCOV data structures correctly, GCC/GCOV generates a bunch of constructor routines that the C runtime is expected to run really early on. skiboot was not running GCC generated constructors. Luckily, it's really easy to do so. This patch will run GCC constructors very early on during boot (if there are any) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'skiboot.lds.S')
-rw-r--r--skiboot.lds.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/skiboot.lds.S b/skiboot.lds.S
index bdc2c2c..8cb88bd 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -76,6 +76,14 @@ SECTIONS
*(.toc1)
*(.branch_lt)
}
+
+ . = ALIGN(0x10);
+ .init : {
+ __ctors_start = .;
+ *(.ctors)
+ *(.init_array)
+ __ctors_end = .;
+ }
. = ALIGN(0x10);
.opd : {