Why demangle functions (21K) are pulled in?

Asked by emblocks on 2014-10-14

Hi,

I have two projects, one is much bigger than the other.
Big difference, one project has std::terminate() with all the demangle stuff, the other just uses abort() from libc.

Why this difference? is this option related or coding style?

Project 1:
.objs\main.o (operator new(unsigned int))
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(new_handler.o)
   ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(new_op.o) (__new_handler)
../arm-none-eabi/lib/armv7e-m\libc_s.a(lib_a-abort.o)
   ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(new_op.o) (abort)
../arm-none-eabi/lib/armv7e-m\libc_s.a(lib_a-atexit.o)
.objs\rtos\rtx\rtx_conf_cm.o (atexit)

project 2:
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(new_op.o)
     obj\release\mbed\common\busin.o (operator new(unsigned int))
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(new_handler.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(new_op.o) (__new_handler)
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_terminate.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(pure.o) (std::terminate())
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_term_handler.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_terminate.o) (__cxxabiv1::__terminate_handler)
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_unex_handler.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_terminate.o) (__cxxabiv1::__unexpected_handler)
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(vterminate.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_term_handler.o) (__gnu_cxx::__verbose_terminate_handler())
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(cp-demangle.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(vterminate.o) (__cxa_demangle)
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_type.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(vterminate.o) (__cxa_current_exception_type)
../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_globals.o)
     ../arm-none-eabi/lib/armv7e-m\libstdc++_s.a(eh_type.o) (__cxa_get_globals)

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
emblocks
Solved:
2014-10-14
Last query:
2014-10-14
Last reply:
emblocks (gnugcc) said : #1