HackerTrans
TopNewTrendsCommentsPastAskShowJobs

meribold

no profile record

Submissions

Show HN: A (marginally) useful x86-64 ELF executable in 298 bytes

github.com
13 points·by meribold·3 เดือนที่ผ่านมา·0 comments

Show HN: A (marginally) useful x86-64 ELF executable in 301 bytes

github.com
65 points·by meribold·3 เดือนที่ผ่านมา·21 comments

Show HN: Git command for creating snapshot commits on a not checked-out branch

github.com
4 points·by meribold·4 เดือนที่ผ่านมา·1 comments

When to use "cat -n" instead of "wc -l"

blog.jpalardy.com
3 points·by meribold·7 เดือนที่ผ่านมา·2 comments

[untitled]

1 points·by meribold·9 เดือนที่ผ่านมา·0 comments

comments

meribold
·2 เดือนที่ผ่านมา·discuss
Lots of comments are also massively overestimating the amount of time/effort that creating this setup required.
meribold
·3 เดือนที่ผ่านมา·discuss
The new latest version (commit 806789e4d454b, 307 bytes) should also work. It no longer sets p_memsz to something unreasonably large, which was most likely the issue with the 301-byte and 298-byte versions from a few days ago.
meribold
·3 เดือนที่ผ่านมา·discuss
I fixed the most likely culprit now (excessively large p_memsz value). It cost a few bytes; the new executable size is 307 bytes.
meribold
·3 เดือนที่ผ่านมา·discuss
Looks 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
·3 เดือนที่ผ่านมา·discuss
GP is likely referring to how fields in the ELF and program header are abused for instructions and data in a way that happens to not break things on Linux.
meribold
·3 เดือนที่ผ่านมา·discuss
If the savings are about `mov $1, %edi` and `mov $10, %ecx`, those 32-bit immediate values line up with the higher bytes of p_filesz and p_memsz in the program header, which have to be zero [1]. If not, what are the savings? :)

[1]: https://github.com/meribold/btry/commit/8ef5a4ce58ae73c489d2...
meribold
·5 เดือนที่ผ่านมา·discuss
My terminal "warns" about them thanks to using a bitmap font that has no (significant?) Unicode coverage beyond code points 0 to 255.
meribold
·10 เดือนที่ผ่านมา·discuss
This seems like it would be great together with a pair of display glasses (like those from XREAL, for example). But I wish it had a TrackPoint.