Static vs Dynamic

Google around until static vs. dynamic compilation and the various tradeoffs make sense. I don't hate this resource https://www.geeksforgeeks.org/static-vs-dynamic-libraries/.

  1. What is static compilation?
  2. What is dynamic compilation?
  3. How does dynamic vs static compilation effect the portability of code? How about the size/detectability?
  4. What are the pros and cons of static vs dynamic?

Get hello.c to statically compile for 32 bit Linux and run locally.

  1. What did you have to do to get that to work? Submit the compilation command.

Run strings, ldd, readelf, strace on the file

Did you know ldd can be used to run arbitrary code? https://catonmat.net/ldd-arbitrary-code-execution?

  1. What do you find? What was the difference between static and dynamic?

It should have worked. But, honestly, there are plenty of reasons that static compilation could have failed here. It's a ridiculously complicated problem that only gets more confusing as complexity increases.