Chrome extension build steps. Because the chrome manifest requires an actual file, you can’t rely on a dev server and hot module reloading. So I’ve hacked vites build command and watch command to constantly recompile chrome extension code as I develop it (typescript + frontend frameworks etc). Add to the fact that you have to manually reload the unpacked chrome extension to apply your new changes, so I’ve hooked solu…
Ask HN: What rabbit hole(s) did you dive into recently?
331–340 of 443 posts
Re: Ask HN: What rabbit hole(s) did you dive into recently?
#332I've been attempting to relearn music theory for the third time. The first attempt was over a decade ago, and I never really quite got it. The second attempt was about 6 years ago, and while the fundamentals clicked and I improved dramatically as a musician/composer, I still only ever learned some small portion of the basics. This time, I'm taking it a few steps further. I'm going back to the basics first to recheck…
I realized 15 years after finishing music school how chord progressions would speed up my learning new songs on piano and learn playing jazz. So Im looking for any kind of literature that would improve my knowledge there.
Re: Ask HN: What rabbit hole(s) did you dive into recently?
#333Earlier quoted context omitted.
I am not sure if I follow correctly. Please clarify the following for me. Have you succeeded in making a tool which undoes the work of the linker?
I did, you can find the Ghidra extension there: https://github.com/boricj/ghidra-delinker-extension The problem is properly identifying the relocations spots and their targets inside a Ghidra database, which is based on references. On x86 it's fairly easy because there's usually a 4-byte absolute or relative immediate operand within the instruction that carries the reference. On MIPS it's very hard because of split M…
But let me stick with some basics. So, I can write and compile an x86 test.c program. Then, I use your extension and undo the linking. Then, I use the results to link again into a new executable? Are the executables identical? When does it break?
How much of a task is it to make it a standalone program? What about x64 support?
Re: Ask HN: What rabbit hole(s) did you dive into recently?
#334I've been researching and planting fruit trees and edible plants. Looking at paw paws, peaches, pears, berries, persimmons and tea bushes.
I'm in a paw paw/persimmon zone, and figs grow nicely. One of the lowest-maintenance trees that don't have much insect pressure. I thought they were notably absent from your list. The variety I chose tastes much like a peach.
Re: Ask HN: What rabbit hole(s) did you dive into recently?
#335Re: Ask HN: What rabbit hole(s) did you dive into recently?
#336Re: Ask HN: What rabbit hole(s) did you dive into recently?
#337Earlier quoted context omitted.
I did, you can find the Ghidra extension there: https://github.com/boricj/ghidra-delinker-extension The problem is properly identifying the relocations spots and their targets inside a Ghidra database, which is based on references. On x86 it's fairly easy because there's usually a 4-byte absolute or relative immediate operand within the instruction that carries the reference. On MIPS it's very hard because of split M…
It is not easy to follow. And there are many things worth discussing. I understand there are complications with MIPS and C++ just to name a few. But let me stick with some basics. So, I can write and compile an x86 test.c program. Then, I use your extension and undo the linking. Then, I use the results to link again into a new executable? Are the executables identical? When does it break? How much of a task is it to…
There are links in the README of my Ghidra extension repository that explain these use-cases in-depth on my blog, but as a summary:
- You can delink the program as a whole and relink it. This can port a program from one file format to another (a.out -> ELF) and change its base address.
- You can delink parts of a program and relink them into a program. This can accomplish a number of things, like transforming a statically-linked program into a dynamically-linked one, swapping the statically linked C standard library for another one, making a port of the program to a foreign system, creating binary patches by swapping out functions or data with new implementations...
- You can delink parts of a program and turn them into a library. For example, I've ripped out the archive code from a PlayStation game built by a COFF toolchain, turned it into a Linux MIPS ELF object file and made an asset extractor that leverages it, without actually figuring out the archive file format or even how this archive code works.
You can probably do even crazier stuff than these examples. This basically turns programs into Lego blocks. As long as you can mend them together, you can do pretty much anything you want. You can also probably work on object files and dynamically-linked libraries too, but I haven't tried it myself.
> Are the executables identical?
Probably not byte-identical, but you can make executables that have the same observable behavior if you don't swap out anything in a manner that impacts it. The interesting stuff happens when you start mixing things up.
> When does it break?
Whenever the object file produced is incorrect or when you don't properly mend together incompatible ABIs. The first case happens mostly when the resynthesized relocations are missing or incorrect, corrupting section bytes in various ways. The second case can happen if you start moving object files across operating systems, file formats, toolchains or platforms.
> How much of a task is it to make it a standalone program?
My analyzers rely on a Ghidra database for symbols, data types, references and disassembly. You can probably port/rewrite that to run on top of another reverse-engineering framework. I don't think turning it into a standalone program would be practical because you'll need to provide either an equivalent database or the analyzers to build it, alongside the UI to fix errors.
> What about x64 support?
Should be fairly straightforward since I already have 32-bit x86 support, so the bulk of the logic is already there.
I encourage you to read my blog if you want to get an idea how this delinking stuff works in practice. You can also send an email to me if you want, Hacker News isn't really set up for long, in-depth technical discussions.
Re: Ask HN: What rabbit hole(s) did you dive into recently?
#338Chrome extension build steps. Because the chrome manifest requires an actual file, you can’t rely on a dev server and hot module reloading. So I’ve hacked vites build command and watch command to constantly recompile chrome extension code as I develop it (typescript + frontend frameworks etc). Add to the fact that you have to manually reload the unpacked chrome extension to apply your new changes, so I’ve hooked solu…
Sounds very cool. Do you have plans to open source that?
Re: Ask HN: What rabbit hole(s) did you dive into recently?
#339Group theory. Something is incredibly beautiful to me about classifying the kinds of symmetry things can have. I’m trying to understand where the sporadic simple groups come from. Starting with the Matthieu groups. So far it seems to be due to some anomaly in Pascal’s triangle, but I’m still trying to put it together. “Another Roof” on YouTube has a good video about this.
i was interested in signal processing with group theory it was quite interesting to see how matrix multiplication corresponds to modulo over finite group.(I am not a math major).