c - 无法制作 nLoader
问题描述
我试过编译这个 Ti-Nspire 漏洞利用,但我遇到了几个问题。其中一些我可以自己解决,但现在我在以下问题上停留了数周(我尝试联系开发人员,但他很忙):
sh make_for_nMaker.sh
CAS_OS
rm -f *.o *.elf
rm -f ../ndless_loader.bin
arm-none-eabi-gcc -Os -Wall -W -marm -mcpu=arm926ej-s -nostdlib -nostartfiles -s -fPIE -ffreestanding -std=c11 -o ndless_loader.o -c ndless_loader.c
arm-none-eabi-ld -nostdlib -nostartfiles -e ndless_loader -PIE -T ldscript ndless_loader.o -o ndless_loader.elf
arm-none-eabi-objcopy -O binary ndless_loader.elf ../ndless_loader.bin
find: paths must precede expression: `1'
find: paths must precede expression: `1'
find: paths must precede expression: `1'
find: paths must precede expression: `1'
find: paths must precede expression: `1'
find: paths must precede expression: `1'
rm -f loader.bin loader.elf
find: paths must precede expression: `1'
find: paths must precede expression: `1'
find: paths must precede expression: `1'
arm-none-eabi-ld -nostdlib -nostartfiles -T ldscript -PIE -flto libgcc/*.o -o loader.elf
arm-none-eabi-ld: libgcc/_absvdi2.o: in function `__absvdi2':
libgcc2.c:(.text+0x28): undefined reference to `abort'
arm-none-eabi-ld: libgcc/_absvsi2.o: in function `__absvsi2':
libgcc2.c:(.text+0x1c): undefined reference to `abort'
arm-none-eabi-ld: libgcc/_addvdi3.o: in function `__addvdi3':
libgcc2.c:(.text+0x54): undefined reference to `abort'
arm-none-eabi-ld: libgcc/_addvsi3.o: in function `__addvsi3':
libgcc2.c:(.text+0x3c): undefined reference to `abort'
arm-none-eabi-ld: libgcc/_mulvdi3.o: in function `__mulvdi3':
libgcc2.c:(.text+0xd0): undefined reference to `abort'
arm-none-eabi-ld: libgcc/_mulvsi3.o:libgcc2.c:(.text+0x18): more undefined references to `abort' follow
make: *** [_Makefile:18: loader.elf] Error 1
mv: cannot stat 'loader.bin': No such file or directory
您可以访问 github 上的所有文件:https ://github.com/parrotgeek1/TI-Nspire/tree/master/boot1.5_exploit/nLoader
也许有人可以帮我解决这个问题。Tbh 对 sh 脚本和所有这些东西没有经验^^
先感谢您!
解决方案
Makefile 错误
OBJS = $(patsubst %.c, %.o, $(shell find . -depth 1 -type f -name \*.c))
--> 这会产生所见的
查找:路径必须在表达式之前:'1'
应该有可能使用-maxdepth 1
代替-depth 1
(这有另一个含义)。
推荐阅读
- android - 在 Termux 的设备上使用 appcompat 库重建 android.jar
- oracle - 我们可以直接在 BEGIN 部分使用参数模式吗?
- google-sheets - 使用谷歌表中的公式替换子字符串
- android - 重用布局及其子组件
- c# - 当在两个表中插入数据时,发送表 id 不是插入,但是当我插入数据时,第二个表 id 应该从第一个表中插入
- function - 如何从 odata 服务读取子父子的深度插入值?
- regex - 如何在换行符和同一行上解析和构造值?
- javascript - 如何在 W3 JS 中解析 JSON 对象
- postgresql - 来自 aws-rds 实例的 postgress 数据库转储
- ruby - Ruby:Chrome 浏览器未启动