newlib/libgloss/msp430
Jozef Lawrynowicz 884b05b54e MSP430: Remove .init/.fini sections
The .init/.fini sections are not required for msp430-elf, and add unnecessary
code bloat to the CRT library. These sections are specified as "unused" by
the MSP430 EABI.

.init existed to call __crt0_run_{init,preinit}_array which run through
the functions in .{init,preinit}_array.
__crt0_run_{init,preinit}_array are already dynamically included like the
other crt0 functions, so these can be placed before the call to main,
which ensures they are still called if needed.
With these functions moved, .init has no purpose and can be removed.

.fini existed to call __crt0_run_fini_array.
However, the "__msp430_fini" symbol which marks the start of .fini has
never been used, so no termination routines have ever been run for
msp430. On returning from main(), _exit() is called which just loops
forever.
So there is no current expectation that __crt0_run_fini_array will
get called by the CRT code. Further work is to ensure functions
registered with atexit can be optionally called during program termination,
and then __crt0_run_fini_array can be registered with atexit during
program initialization.

The mechanisms for supporting the "-minrt" option have also been removed.
"-minrt" enabled a "minimum runtime environment" by removing calls to
functions which run global static initializers and constructors. Since
this behaviour is now dynamic, and these functions are only included
when needed, the minrt versions of the CRT object files are no longer
required.
2019-07-24 16:22:00 -04:00
..
Makefile.in MSP430: Remove .init/.fini sections 2019-07-24 16:22:00 -04:00
cio.S Update CIO hooks to be more flexible. 2015-12-17 16:22:52 -05:00
cio.h [newlib] 2013-05-13 21:39:51 +00:00
ciosyscalls.S Seperate MSP430 cio syscalls into individual function sections. 2016-02-09 13:44:05 +00:00
configure [newlib] 2013-05-13 21:39:51 +00:00
configure.in [newlib] 2013-05-13 21:39:51 +00:00
crt0.S MSP430: Remove .init/.fini sections 2019-07-24 16:22:00 -04:00
crt_bss.S * msp430/Makefile.in (SCRIPTS): Add intr_vectors.ld. 2013-09-18 07:38:13 +00:00
gcrt0.S [newlib] 2013-05-13 21:39:51 +00:00
intr_vectors.ld * msp430/Makefile.in (SCRIPTS): Add intr_vectors.ld. 2013-09-18 07:38:13 +00:00
memmodel.h Adds support for placing MSP430 code and data into either low memory or high memory. 2015-05-27 13:30:19 +02:00
msp430-sim.ld MSP430: Remove .init/.fini sections 2019-07-24 16:22:00 -04:00
msp430xl-sim.ld MSP430: Remove .init/.fini sections 2019-07-24 16:22:00 -04:00
sbrk.c [newlib] 2013-05-13 21:39:51 +00:00
syscalls.S Add support for persistent data to the MSP430 linker scripts. 2015-10-06 17:33:16 +01:00
unlink.c * msp430/Makefile.in (NOSYS_OBJS): Add unlink.o. 2014-04-30 11:30:14 +00:00
write.c Fix definition of write() to use const char * for the type of the buffer 2019-04-15 14:21:59 +02:00