gcc常用编译选项对代码影响.docVIP

  • 3
  • 0
  • 约1.21万字
  • 约 10页
  • 2017-08-12 发布于安徽
  • 举报
gcc常用的编译选项对代码的影响 原始文档:/articles/200112/320.html 创建时间:2001-12-21 浏览次数:78 原创:alert7 (sztcww_at_) 来源:/ gcc常用的编译选项对代码的影响 by alert7 2001-12-21 测试环境 redhat 6.2 ★ 前言 本文讨论gcc的一些常用编译选项对代码的影响。当然代码变了, 它的内存布局也就会变了,随之exploit也就要做相应的变动。 gcc的编译选项实在太多,本文检了几个最常用的选项。 ★ 演示程序 [alert7@redhat62 alert7]$ cat test.c #include stdio.h void hi(void) { printf(hi); } int main(int argc, char *argv[]) { ????????hi(); ????????return 0; } ★ 一般情况 [alert7@redhat62 alert7]$ gcc -o test test.c [alert7@redhat62 alert7]$ wc -c test ??11773 test [alert7@redhat62 alert7]$ gdb -q test (gdb) disass main Dump of assem

文档评论(0)

1亿VIP精品文档

相关文档