1*2224c93eSguanjinquan# binutils-2.38 2*2224c93eSguanjinquan 3*2224c93eSguanjinquan## 说明 4*2224c93eSguanjinquan 5*2224c93eSguanjinquan这里是移植到用户态的binutils-2.38,用于DragonOS的用户态编译器。在编译这里之前,请先在项目根目录下运行`make -j $(nproc)`, 以确保编译binutils所依赖的依赖库已经编译好。 6*2224c93eSguanjinquan 7*2224c93eSguanjinquan先修改build.sh中的路径,配置好需要的信息,再使用以下命令,即可开始编译: 8*2224c93eSguanjinquan 9*2224c93eSguanjinquan```bash 10*2224c93eSguanjinquanbash build.sh 11*2224c93eSguanjinquan``` 12*2224c93eSguanjinquan 13*2224c93eSguanjinquan--- 14*2224c93eSguanjinquan 15*2224c93eSguanjinquan请注意,如果您要修改binutils的代码,请先使用以下命令,构建编辑binutils代码配置的环境: 16*2224c93eSguanjinquan 17*2224c93eSguanjinquan```bash 18*2224c93eSguanjinquandocker build --no-cache -t dragonos-binutils-build . 19*2224c93eSguanjinquan``` 20*2224c93eSguanjinquan 21*2224c93eSguanjinquan然后再在binutils目录下执行以下命令,进入容器: 22*2224c93eSguanjinquan 23*2224c93eSguanjinquan```bash 24*2224c93eSguanjinquandocker run --rm -it -v $PWD:/workdir -w /workdir dragonos-binutils-build 25*2224c93eSguanjinquan``` 26