Selectively suppressing glibc link warnings?

℡╲_俬逩灬. 提交于 2019-12-11 07:13:54

问题


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")


回答1:


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

No.



来源:https://stackoverflow.com/questions/32190834/selectively-suppressing-glibc-link-warnings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!