首页
社区
课程
招聘
[求助]iOS使用命令行编译arm64时使用-fno-pie报错
2020-6-12 15:39 10672

[求助]iOS使用命令行编译arm64时使用-fno-pie报错

2020-6-12 15:39
10672

使用命令行简单编译了一个.c文件,.c文件内容:

#include <stdio.h>
#include <stdlib.h>
void secret() {
    printf("You shouldn't be here ;P\n");
    // system("ls -la /");
}
int main() {
    char buff[12];
    gets(buff);

    printf("You entered %s\n", buff);

    return 0;
}

在终端使用命令编译:

clang hello.c -target arm64-apple-ios8.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -fno-pie -fno-stack-protector -mno-thumb -o hello

终端提示:
ld: warning: -no_pie ignored for arm64

 

查看编译好的hello文件,是有PIE标识的:
图片描述

请问各位大佬, arm64架构能在编译时取消掉 PIE 吗??

阿里云助力开发者!2核2G 3M带宽不限流量!6.18限时价,开 发者可享99元/年,续费同价!

收藏
免费 1
打赏
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回