|
|
|
|
|
by josephcsible
802 days ago
|
|
A few things have changed since 2001 that require extra flags to be able to follow along: 1. Most systems today are 64-bit, where gcc needs "-m32" to build the 32-bit assembly code that this article uses. 2. Modern versions of GCC's ld enable "-z separate-code" by default, which adds several kilobytes of padding that completely dwarfs everything this article does until you start hand-crafting ELF files. Passing "-Wl,-z,noseparate-code" to gcc undoes this. 3. Most Linux distros now configure GCC with "--enable-default-pie", which similarly inflates all of the binaries by several kilobytes. Passing "-no-pie" to gcc undoes this. |
|