Some functionality in crtstuff.c will never be used for some targets, resulting in unnecessary code bloat in the crt* object files.
For example, msp430-elf uses .{init,fini}_array, does not support shared objects, does not support transactional memory and could be configured to remove support for exceptions. Therefore __do_global_dtors_aux(), frame_dummy(), {,de}register_tm_clones could be safely removed, saving code size. The following patches implement the generic mechanisms which enable the features associated with the this functionality to be removed. Successfully bootstrapped and regtested for x86_64-pc-linx-gnu. Successfully regtested for msp430-elf. Ok to apply? P.S. An MSP430-specific series of patches to make use of the functionality added here will be submitted separately. Jozef Lawrynowicz (3): libgcc: Add --disable-eh-frame-registry configure option libgcc: Dont define __do_global_dtors_aux if it will be empty libgcc: Implement TARGET_LIBGCC_REMOVE_DSO_HANDLE gcc/doc/install.texi | 11 +++++++++++ gcc/doc/tm.texi | 11 +++++++++++ gcc/doc/tm.texi.in | 11 +++++++++++ libgcc/Makefile.in | 4 +++- libgcc/configure | 22 ++++++++++++++++++++++ libgcc/configure.ac | 17 +++++++++++++++++ libgcc/crtstuff.c | 33 +++++++++++++++++++++++---------- 7 files changed, 98 insertions(+), 11 deletions(-) -- 2.17.1