I see a lot about source codes being leaked and I’m wondering how it that you could make something like an exact replica of Super Mario Bros without the source code or how you can’t take the finished product and run it back through the compilation software?

  • @Treczoks
    link
    1311 months ago

    Just wait until you see the crazy optimizers for embedded systems. They take the complete code of a system into consideration, and, in a number of compile passes, reuses code snippets from app, libraries, and OS layer to create one big tangled mess that is hard to follow even if you have the source code…

    • @[email protected]
      link
      fedilink
      411 months ago

      Isn’t that still the same exact process as a normal compiler except in the case of embedded systems your OS is like a couple kilobytes large and just compiled along with the rest of your code?

      As in, are those “crazy optimizations” not just standard compiler techniques, except applied to the entire OS+applications?

      • @[email protected]
        link
        fedilink
        English
        411 months ago

        The main difference is that when you compile a program for Windows, Linux etc., you have an operating system and kernel with their exposed functions/interfaces so even in a compiled program it’s pretty easy to find the function calls for opening a file, moving a window, etc. (as long as the developer doesn’t add specific steps hiding these calls). But in an embedded system, it’s one large mess without any interfaces apart from those directly on the hardware level.

      • @Treczoks
        link
        411 months ago

        In a way, yes. But it really creates a mess when the linker starts sharing code between your code of which you have sources, and then jumps in the middle of system code for which you don’t have sources. And a pain in the whatever to debug.

          • @Treczoks
            link
            211 months ago

            For a number of reasons people use commercial OSes in this world, too.

            • @[email protected]
              link
              fedilink
              111 months ago

              Does commercial mean closed source in this context though? It seems like a waste of resources not to provide the source code for an rtos.

              Considering how small in size they tend to be + with their power/computational constraints I can’t imagine they have very effective DRM in place so it shouldn’t take that much to reverse engineer.

              May as well just provide the source under some very restrictive license.

              • @Treczoks
                link
                110 months ago

                Yes, it is closed source, but you can buy a “source license”. Which is painfully expensive.