Solving Problem with GNU Linker and “referenced in section, defined in discarded section ” Error Message

I have been running recently into an interesting case where the GNU ARM Linker failed to link an application with strange error messages:

referenced in section, defined in discarded section

referenced in section, defined in discarded section

Continue reading