News for hackers. Stuff that matters.
Re:The earliest versions of the first C compiler known to exist by mananaysiempre on Monday March 24, 2025 @06:49PM (#43466212)
There are better tools to do this these days—with the GNU toolchain, for example, you’d use a linker script and make sure you’re building a non-position-independent static executable. Alternatively, you could use self-relative pointers: instead of having foo_t *foo and putting p there, have ptrdiff_t foo and put ((char *)p - (char *)&foo) there.

There are no comments on this comment yet.