Re:Single C file TLS 1.2/1.3 implementation using tomcrypt
by tedunangst on Sunday January 06, 2019 @03:15PM
(#18840355)
The compiler invocation above only creates a single object file.
Re:Single C file TLS 1.2/1.3 implementation using tomcrypt
by tialaramex on Sunday January 06, 2019 @07:42PM
(#18841820)
No, but I can see why you thought so.
The invocation above creates one object file for each C source file, as temporary files, (in a Unix system you can watch it do this with a suitably powerful syscall tracer, presumably something similar is possible on non-Unix systems but I don't know exactly how)
Then it links them and produces the output you've mistaken for an "object file", then it deletes the temporary files.
Re:Single C file TLS 1.2/1.3 implementation using tomcrypt
by tedunangst on Monday January 07, 2019 @01:12PM
(#18848063)
Ah, probably the easiest way to deal with some translation unit edge cases. :(
But within a single object the compiler doesn't need to obey the ABI rule at all if that's faster.
Now, you obviously could imagine an object and more powerful linkers that had enough optimisation magic to produce the same output executable from the sixty object files, but just spitting out a single source code file is a LOT easier than making that optimisation work on every platform now and in the future.