drivers/synth: add initial synthetic "or" function using section ranges
This demos building a synthetic "or" function using section
ranges in asm. The file or.S consists of completely unordered pieces of
code, each doing different things and each also pegged onto separate
the same section, however specified with a specific order level.
The different pieces of unordered code illustrates how we'd expect code to
be gathered and compiled, each piece of code could realiastically be in
separate files. We add some #ifdefs with CONFIG_* options, we could also
expect that some of the code might be present and some of it might not
while it all still works together.
We'll later add support for building these pieces of code separately.
The linker stiches these pieces of code for us using the levels for
order, in the end it builds a single concise function which then runs
Upon running this we get a series of variables OR'd together:
Synthetics: synth_init_or(2) returns: 0xDEADBEEF
Signed-off-by: Luis R. Rodriguez <email@example.com>
6 files changed