5 ms·
Dell 5440 $ git clone https://github.com/meribold/btry ... $ make as -mx86-used-note=no btry.s -o btry.o objcopy -O binary btry.o btry
by anonymous67453 5mo ago
Dell 5440
$ git clone https://github.com/meribold/btry
...
$ make
as -mx86-used-note=no btry.s -o btry.o
objcopy -O binary btry.o btry
chmod +x btry
$ ./btry
Segmentation fault ./btry
$ strace -f ./btry
execve("./btry", ["./btry"], 0x7ffc1a562078 /* 57 vars */) = -1 ENOMEM (Cannot allocate memory)
$ file btry
btry: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, corrupted section header size
- meribold 5mo agoLooks like I may have stretched what values are acceptable for p_filesz/p_memsz too far. What's your kernel version? (I tested it on 6.8.0 and 4.4.0.) Perhaps the 316-byte version at commit 451827cfd5399074 (before that particular hack was introduced) would work.
- meribold 5mo agoI fixed the most likely culprit now (excessively large p_memsz value). It cost a few bytes; the new executable size is 307 bytes.