linux 大端编译,little大小端问题mmips-linux-gnu-gcc和ld默认使用大端方式编译链接

luther@gliethttp:~$ man gcc

-EL Compile code for little endian mode.  This is the default.

-EB Compile code for big endian mode.

-mtune=name

This option is very similar to the -mcpu= option, except that instead of

specifying the actual target processor type, and hence restricting which

instructions can be used, it specifies that GCC should tune the performance of

the code as if the target were of the type specified in this option, but still

choosing the instructions that it will generate based on the cpu specified by a

-mcpu= option.  For some ARM implementations better performance can be obtained

by using this option.

-mtune=24kf # -EL小端编译,-EB大端编译

gcc默认为-EL小端,而mips-linux-gnu-gcc默认使用大端,当然mips-linux-gnu-ld也要加入-EL的参数[luther.gliethttp]

luther@gliethttp:~$ mips-linux-gnu-gcc --version

mips-linux-gnu-gcc (Sourcery G++ Lite 4.3-51) 4.3.2

Copyright (C) 2008 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

阅读(7929) | 评论(1) | 转发(0) |

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值