摘要: 一、设备树 下面是我们将要实验的设备树的例子: / { #address-cells = <1>; #size-cells = <1>; demo_level0 { compatible = "simple-bus"; ranges = <0x0 0x3000000 0x3000>; #addres 阅读全文
posted @ 2023-01-14 18:40 流水灯 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: gcc -shared -fPIC liberr.c -o liberr.so -fPIC 作用于编译阶段,告诉编译器产生与位置无关代码(Position-Independent Code), 则产生的代码中,没有绝对地址,全部使用相对地址,故而代码可以被加载器加载到内存的任意位置,都可以正确的执行 阅读全文
posted @ 2023-01-14 17:27 流水灯 阅读(1100) 评论(0) 推荐(0) 编辑