diff options
author | 2018-08-12 18:46:50 -0400 | |
---|---|---|
committer | 2018-08-12 18:46:50 -0400 | |
commit | 73e0b2a25d1766debe4f603dd13a732de2f1993d (patch) | |
tree | d574ed4dee9ba3bc9ec195f6cb31b1c567226d83 /cortex-m-rt/link.x.in | |
parent | 743b8fc282f16ab54ff9ff2540f8db337f3562ad (diff) | |
download | cortex-m-73e0b2a25d1766debe4f603dd13a732de2f1993d.tar.gz cortex-m-73e0b2a25d1766debe4f603dd13a732de2f1993d.tar.zst cortex-m-73e0b2a25d1766debe4f603dd13a732de2f1993d.zip |
Change pre-init to use an empty function that is overwridden instead of a sentinel
Using a sentinel creates a conditional branch that cannot be optimized out
whereas an empty default function keeps the codepath linear and can be optimized
out in the best case.
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
Diffstat (limited to 'cortex-m-rt/link.x.in')
-rw-r--r-- | cortex-m-rt/link.x.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index c2511f7..23f406d 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -54,7 +54,7 @@ EXTERN(__INTERRUPTS); /* `static` variable similar to `__EXCEPTIONS` */ /* # Pre-initialization function */ /* If the user overrides this using the `pre_init!` macro or by creating a `__pre_init` function, then the function this points to will be called before the RAM is initialized. */ -PROVIDE(__pre_init = 1); +PROVIDE(__pre_init = DefaultPreInit); /* # Sections */ SECTIONS |