Mryqu's Notes


  • 首页

  • 搜索
close

[C++] 从静态库获取GCC版本和编译平台

时间: 2013-10-24   |   分类: Tool   C++     |   阅读: 68 字 ~1分钟

获取GCC版本:strings -a {library} | grep “GCC: (”

mryqu> strings -a libcurl.a | grep "GCC: ("
GCC: (GNU) 4.4.5 20110214 (Red Hat 4.4.5-6)

获取编译平台信息:ar -x {library}file *.o

mryqu> ar -x libcurl.a
mryqu>file libcurl_la-url.o
libcurl_la-url.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

参考

How to retrieve the GCC version used to compile a given ELF executable?
How to see the compilation platform of a static library file

标题:[C++] 从静态库获取GCC版本和编译平台
作者:mryqu
声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!

#cpp# #static# #library# #gcc# #platform#
*nux下导出文件16进制内容的命令xxd
用find和grep搜索特定目录下特定文件中的特定关键字
  • 文章目录
  • 站点概览

Programmer & Architect

662 日志
27 分类
1472 标签
GitHub Twitter FB Page
    • 参考
© 2009 - 2023 Mryqu's Notes
Powered by - Hugo v0.120.4
Theme by - NexT
0%