Tag Archives: gcc/gdb compilation and debugging

GCC forces all symbols in the link library

GCC forces all symbols in the link library

wants to abstract SDK related functions out of a library for app to call.
thus the app-related code is compiled and linked to the library to generate the final elf executable.

method:

Add -wl,–whole-archive,

  • , add their own library to the mandatory link
  • ,–no whole-archive restore
  • :
    – Wl, — the whole – archive xx. A Wl, – no – whole – archive