+ -
当前位置:首页 → 问答吧 → 为什么suse虚拟机上的gcc不能使用-T选项

为什么suse虚拟机上的gcc不能使用-T选项

时间:2011-03-31

来源:互联网

我在cygwin下试验:
zhong@XP-201007181744 /cygdrive/d
$ gcc test.c -o test -T lsp.x

zhong@XP-201007181744 /cygdrive/d
$ ./test
hello
是可以的,其中lsp.x文件是通过ld --verbose  > lsp.x得到的
但是在虚拟机上试验时提示:
zyd@HCC:~/projects> gcc dd.c -o test1 -T default_lsp.x
as: unrecognized option '-T'

作者: vfdff   发布时间: 2011-03-31

虚拟机和cygwin下 /usr/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exe --help 都可以看到
-T FILE, --script FILE      Read linker script
--default-script FILE, -dT  Read default linker script
但是很奇怪为什么虚拟机下会使用as解析-T选项?是不是这个gcc的bug
zyd@HCC:~/projects gcc -v
gcc version 4.5.1 (GCC)

作者: vfdff   发布时间: 2011-04-01