13
The Linker
Around 2016 I took part in a project called Valo, where we were building our own counterpart to Dropbox. I got the Mac version, and the condition was that its insides, everything that watches files and talks to the server, would later go into the iPhone version without rework. Then a man joined the team who was to write that iPhone version. He knew the names of all the necessary classes, remembered which method returns what, and put screens together briskly. What happens to his code between pressing the Build button and the icon appearing on the phone he had no notion of whatever, and when asked whether a library was linked statically or dynamically he looked at me as though I had enquired after his compiler’s blood group.
I was taken aback, and I should not have been. I knew these things because I had spent several years in the black window of a debugger with libssh and OpenSSL, both of which are shared libraries in the purest form, and brains had nothing to do with it. He did not know them because the platform he had grown up on had gone to great lengths so that he would not think about them.
A program seldom consists of its own code alone. It gets other people’s code in the form of libraries. A special program, the linker, can cut the necessary pieces out of a library and paste them into the executable file, after which the library is no longer needed, and such linking is called static. Or it can leave in the executable only a note that such-and-such a library will be required, while the library itself is kept as a separate file and attached at launch, and that linking is dynamic. In Linux nearly everything is arranged this way, which is why one copy of OpenSSL on the disk serves a hundred programs, and if a hole is found in it, one file is replaced.
Gratis, solo falta un paso
El resto del libro es gratis
Deja tu correo y te mando un enlace para confirmarlo. Después del clic, todos los capítulos se abren aquí, en este dispositivo, durante un año. Cuando salga un libro nuevo, escribiré a esa dirección; responde “basta” a cualquier correo y no vuelvo a escribir.
¿Tienes cuenta INITE? Entra y el libro se abre sin correo.
No se cobra nada por el libro. Si quieres apoyarlo, puedes donar desde cualquier capítulo.
Cómo se guarda la dirección