Best replacement for GCC #ident

こ雲淡風輕ζ 提交于 2019-12-07 09:05:48

问题


I used to set this at top of my source files to be able to grep -a "ID :" on my binaries :

#ident "\\n$@           ID : my_library.o v1.3 (25/08/07)@$\\n"

However, this is deprecated in GCC 4.3.3. Any suggestions ?

I came through __attributes__(section()), but not sure if this will get stripped, and anyway, I was guessing there was a more straightforward way.

Thank you


回答1:


The #ident directive (as well as #sccs) was undeprecated, so you should just keep it!

(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41632)



来源:https://stackoverflow.com/questions/3650222/best-replacement-for-gcc-ident

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