Tuesday, October 11, 2022

[SOLVED] Selectively suppressing glibc link warnings?

Issue

glibc uses the following "technique" to generate link warnings...

#define link_warning(symbol, msg) \
  __make_section_unallocated (".gnu.warning." #symbol) \
  static const char __evoke_link_warning_##symbol[]     \
  __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \
  = msg;

For a particular link warning generated by this, is there any command-line switch that can be passed to ld or gcc in order to suppress it?

(For compile-time warnings you can suppress with `#pragma diagnostic foo ignore")


Solution

is there any command-line switch that can be passed to ld or gcc in order to suppress it

No.



Answered By - Employed Russian
Answer Checked By - Gilberto Lyons (WPSolving Admin)