diff options
author | Steve Markgraf <steve@steve-m.de> | 2013-12-29 20:33:26 +0100 |
---|---|---|
committer | Steve Markgraf <steve@steve-m.de> | 2013-12-29 20:33:26 +0100 |
commit | a903b3c1ee27047c79728b18ff6340d23d1aad2e (patch) | |
tree | 623e811e0667734dbff7461e8f617272585e986a /src/target/firmware/board/compal_e88 | |
parent | 2d0a5acaf3f3a7045475914832eb5ea0af7b203e (diff) |
fw: tell linker to add init_array to ctor section
Starting with version 4.8, gcc places functions
with __attribute__ ((constructor)) in .init_array
instead of .ctors by default.
This broke firmware images built with gcc >= 4.8.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/target/firmware/board/compal_e88')
-rw-r--r-- | src/target/firmware/board/compal_e88/flash.lds | 1 | ||||
-rw-r--r-- | src/target/firmware/board/compal_e88/loader.lds | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/target/firmware/board/compal_e88/flash.lds b/src/target/firmware/board/compal_e88/flash.lds index cf0f6a41..67d727ff 100644 --- a/src/target/firmware/board/compal_e88/flash.lds +++ b/src/target/firmware/board/compal_e88/flash.lds @@ -54,6 +54,7 @@ SECTIONS LONG(SIZEOF(.ctors) / 4 - 2) /* ctor pointers */ KEEP(*(SORT(.ctors))) + KEEP(*(SORT(.init_array))) /* end of list */ LONG(0) } > FLASH diff --git a/src/target/firmware/board/compal_e88/loader.lds b/src/target/firmware/board/compal_e88/loader.lds index a7a001fc..22febff4 100644 --- a/src/target/firmware/board/compal_e88/loader.lds +++ b/src/target/firmware/board/compal_e88/loader.lds @@ -67,6 +67,7 @@ SECTIONS LONG(SIZEOF(.ctors) / 4 - 2) /* ctor pointers */ KEEP(*(SORT(.ctors))) + KEEP(*(SORT(.init_array))) /* end of list */ LONG(0) } > FLASH |