Post B6QTycdySBIbDErqUK by thesamesam@social.treehouse.systems
 (DIR) More posts by thesamesam@social.treehouse.systems
 (DIR) Post #B6QTycLBa2GoGy4qCe by andersonc0d3@infosec.exchange
       0 likes, 0 repeats
       
       I spent quite a bit of time this past weekend reading about the history of PIE (ET_DYN) binaries. As with many things in computing, it's quite complex (and controversial).It seems I finally figured out that the C runtime object files added by the compiler come from both the compiler itself and the libc. The compiler provides crtbegin/crtend files that support constructors and destructors. I previously had the erroneous impression that all those object files came from the compiler only, and I had wondered for a long time why the compiler added so much code to the binary. Now it makes sense.When PIE is enabled, the C runtime object files from the compiler and libc change, using Scrt1.o rather than crt1.o, as an example. I can now pinpoint exactly some of the changes implemented by glibc to support PIE binaries.All of this research was to be able to answer more precisely for my students the roles of the compiler, glibc, and the kernel in supporting ASLR and PIE binaries. I wanted to see the commits and mailing list discussions, but I couldn't find much so far. Now I have about 20 tabs open about those topics that I need to dig into to understand a bit better.
       
 (DIR) Post #B6QTycdySBIbDErqUK by thesamesam@social.treehouse.systems
       1 likes, 0 repeats
       
       @andersonc0d3 I found learning about static-pie illustrative as well.