21 Oct 2024 |
emily | apparently .ci is expensive | 18:16:45 |
Alyssa Ross | In reply to @luckytethys:matrix.org It has a fallback where it tries to detect whether it is on a system where it knows how to install a architecture-specific binutils and then suggests how to do that Couldn't it just try a non-architecture-specific one before doing that, though? | 18:17:15 |
Tethys Svensson | How would it know if the failure is because the binutils is not good enough, or if it's because the user wrote some bad shellcode? | 18:18:04 |
Alyssa Ross | How does it currently know? | 18:18:23 |
Alyssa Ross | It just assumes that if it finds an architecture-specific program that it will definitely work? | 18:18:33 |
Tethys Svensson |
- If it finds an architecture-specific program it will use that
- If the target architecture is sufficiently close to the host architecture and it finds a host program, it will use that
- Otherwise error out. If it can figure out a way to help the user install a proper binutils it will print that
| 18:19:44 |
Alyssa Ross |
You can list the available binary formats with objdump -i
| 18:20:23 |
Alyssa Ross | Would doing that also be hard? | 18:20:28 |
Alyssa Ross | Or is that the wrong thing? | 18:20:36 |
Tethys Svensson | Parsing that format is not particularly easy. And I would have to write a similar parser for every other architecture-specific tool they use | 18:21:54 |
Tethys Svensson | Because you wouldn't necessarily know that the readelf you find is from the same place as the objdump you find | 18:22:07 |
Alyssa Ross | Is supporting mixing multiple binutils builds like that really that important? | 18:22:39 |
Alyssa Ross | that sounds like an odd thing to do | 18:23:17 |
Alyssa Ross | (with the exception of gas, where there's a reason for it, as we've discovered) | 18:23:31 |
jh-devv 🏳️⚧️ | How do I make dockerTools.buildimage run an command in the shell in the image? | 18:23:44 |
Alyssa Ross | (BTW: it looks like a gas-only build is not as easy as I hoped, so I will look into emily's suggestion of building gas for each architecture in binutils-unwrapped-all-targets)
| 18:23:49 |
Lily Foster | In reply to @emilazy:matrix.org apparently .ci is expensive well we've still been paying for it. the previous payment info had expired and no one who was set to receive registrar renewal reminder emails acted on them i guess until after it had lapsed payment and expired a month after | 18:24:12 |
jh-devv 🏳️⚧️ | * | 18:24:12 |
Lily Foster | (so they bought ofborg.org real fast while waiting on that to be fixed and decided to stay on it) | 18:24:51 |
Lily Foster | * (so they bought ofborg.org real fast while waiting on that to be fixed and decided to stay on the .org instead) | 18:25:13 |
Tethys Svensson | So your suggestion for e.g. finding readelf is to:
- Look for a target specific readelf
- Look for a host specific readelf when target is sufficiently close to host
- Look for any readelf. If one is found, look for a objdump that looks to come from a similar place. If that is found, parse the output of
objdump -i to see if your target architecture is in there. If it is, return that readelf
- Otherwise do the fallback of trying to guide the user to an install command
Or am I missing something?
| 18:25:20 |
Alyssa Ross | Well, I wouldn't have separate "looking" and "running" steps. If running it fails with ENOENT, you didn't find it. My step three would be "run objdump -i and see if the target architecture is in there. If it is, run readelf.
| 18:27:17 |
Alyssa Ross | * Well, I wouldn't have separate "looking" and "running" steps. If running it fails with ENOENT, you didn't find it. My step three would be "run objdump -i and see if the target architecture is in there. If it is, run readelf."
| 18:27:33 |
Alyssa Ross | But I also think it might be worth waiting a bit here while I check doing a just-gas build is actually doable. | 18:28:12 |
Tethys Svensson | In principle that could be done, but not without majorly refactoring the code. The current code is very much structured as "try to find the correct binary, when found go build a big command up around it". | 18:32:36 |
Alyssa Ross | I think I might be a bit tired to figure out gas | 18:33:39 |
Alyssa Ross | The thing I'm trying to figure out is whether it's reasonable to just make install multiple times into the same prefix, with different configurations.
| 18:34:17 |
Alyssa Ross | It would be very nice if it was. | 18:34:22 |
hexa | Download image.png | 18:34:36 |
| ReecerTV joined the room. | 18:54:55 |