![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
C99C89
学习操作系统和体系结构中,为Linux系统编程打基础,可能要一个学期后才能更新。
展开
-
gcc编译器报错:/usr/bin/ld: main.o: relocation R_X86_64_32 against `.rodata.str1.1‘ can not be used when m
今天编译源文件为main.c和str.c时的一个程序时,gcc编译器报了如下错误:$ makecc -c -o main.o main.ccc -c -o str.o str.cgcc main.o str.o -o main/usr/bin/ld: main.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE原创 2022-04-28 18:00:20 · 2017 阅读 · 0 评论 -
const关键字的实验
今天做了一个实现,想看看const变量的值能不能被修改:程序代码:#include <iostream>int main(){ int arr[10]; int b = 10; arr[10] = 20; std::cout << "b = " << b << std::endl; return 0;}然而编译正确,运行时程序崩溃,这是编译和运行结果:➜ A原创 2022-04-25 15:31:56 · 1018 阅读 · 0 评论