diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-03-22 19:55:35 -0500 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-03-23 19:36:21 +0100 |
commit | d23e292ef624ae1000b700399ece00c72946ede1 (patch) | |
tree | c3a5eab6a8920338ac48d810c9b3e43550f36ebe /src | |
parent | 2bd2e37536a7bc31023233cf3b7c6682cbd8176b (diff) |
rmodule: align ld script with latest x86 ld script
The x86 linker script added a .textfirst section. In
order to properly link ramstage as a relocatable module
the .textfirst section needs to be included.
Also, the support for code coverage was added by including
the constructor section and symbols. Coverage has not been
tested as I suspect it might not work in a relocatable
environment without some tweaking. However, the section
and symbols are there if needed.
Change-Id: Ie1f6d987d6eb657ed4aa3a8918b2449dafaf9463
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/2883
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/rmodule.ld | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/rmodule.ld b/src/lib/rmodule.ld index c8bd297e51..41d6357fe1 100644 --- a/src/lib/rmodule.ld +++ b/src/lib/rmodule.ld @@ -37,11 +37,17 @@ SECTIONS .text : AT (_payload_begin_offset) { /* C code of the module. */ + *(.textfirst); *(.text); *(.text.*); /* C read-only data. */ . = ALIGN(16); + __CTOR_LIST__ = .; + *(.ctors); + LONG(0); + __CTOR_END__ = .; + /* The driver sections are to allow linking coreboot's * ramstage with the rmodule linker. Any changes made in * coreboot_ram.ld should be made here as well. */ |