Ubuntu :relocation R_X86_64_32 against `.rodata‘ can not be used when making a PIE object;

简介: Ubuntu :relocation R_X86_64_32 against `.rodata‘ can not be used when making a PIE object;

relocation R_X86_64_32 against `.rodata’ can not be used when making a PIE object; recompile with -fPIE


今天用Makefile make几个可执行文件:


报了这么个错



意思是在编译成可执行程序时候(pie就是生成可执行程序,与pic有区别),.dodata不能用,让你重新编译。


但是再编译就会发现还是这个错误,其实是项目编译之前没有清理,直接


sudo make clean
sudo make


就OK了

相关文章
|
3月前
|
Ubuntu
Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file
本文描述了在Ubuntu 22.04系统上编译AOSP时遇到的`libncurses.so.5`缺失错误,并提供了通过安装相应库解决该问题的步骤。
283 0
|
6月前
|
Ubuntu Linux
Ubuntu 报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.
系统未使用 `systemd` 初始化导致错误。解决方法是通过 `apt` 安装。首先备份并更换`sources.list`,添加阿里云镜像源,然后更新源并以管理员权限运行 `apt-get install systemd -y` 和 `apt-get install systemctl -y` 安装所需组件。
1405 3
relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile with
relocation R_X86_64_PC32 against symbol can not be used when making a shared object recompile with
671 0
relocation R_X86_64_PC32 against symbol lua_newstate can not be used when making a shared object
relocation R_X86_64_PC32 against symbol lua_newstate can not be used when making a shared object
261 0
relocation R_X86_64_PC32 against symbol ff_pw_9 can not be used when making a shared object
relocation R_X86_64_PC32 against symbol ff_pw_9 can not be used when making a shared object
284 0
relocation R_X86_64_PC32 against symbol ff_pw_9 can not be used when making a shared object
relocation R_X86_64_PC32 against symbol ff_pw_9 can not be used when making a shared object
158 0
libgsm.a relocation R_X86_64_PC32 can not be used when making a shared object; recompile with -fPIC
libgsm.a relocation R_X86_64_PC32 can not be used when making a shared object; recompile with -fPIC
228 0
can not be used when making a shared object; recompile with -fPIC
can not be used when making a shared object; recompile with -fPIC
302 0
|
29天前
|
Java
Java Object 类详解
在 Java 中,`Object` 类是所有类的根类,每个 Java 类都直接或间接继承自 `Object`。作为所有类的超类,`Object` 定义了若干基本方法,如 `equals`、`hashCode`、`toString` 等,这些方法在所有对象中均可使用。通过重写这些方法,可以实现基于内容的比较、生成有意义的字符串表示以及确保哈希码的一致性。此外,`Object` 还提供了 `clone`、`getClass`、`notify`、`notifyAll` 和 `wait` 等方法,支持对象克隆、反射机制及线程同步。理解和重写这些方法有助于提升 Java 代码的可读性和可维护性。