Linker – S3lab http://s3lab.deusto.es S3lab Security Blog Wed, 06 May 2020 12:51:35 +0000 en-US hourly 1 https://wordpress.org/?v=5.1.5 How does a linker work? (III) – Types of symbols http://s3lab.deusto.es/how-linker-work-3/ Sat, 14 Oct 2017 10:00:40 +0000 http://s3lab.deusto.es/?p=9515 After learning what information contains the symbol table in the previous post, we can now talk more about the attributes that a symbol can have and what role do they have in the resolution of symbols from the linker point

The post How does a linker work? (III) – Types of symbols appeared first on S3lab.

]]>
After learning what information contains the symbol table in the previous post, we can now talk more about the attributes that a symbol can have and what role do they have in the resolution of symbols from the linker point of view.. Remember that the symbols can be global (global), local (local) or weak. Globals are non-static defined functions in addition to the initialized variables defined without static. A local symbol is one defined with a static, and finally the weak symbols are the uninitialized global variables.

The post How does a linker work? (III) – Types of symbols appeared first on S3lab.

]]>
How does a linker work? (II) – The symbol table http://s3lab.deusto.es/how-linker-work-2/ Fri, 15 Sep 2017 16:00:08 +0000 http://s3lab.deusto.es/?p=9349 In previous posts we talked about that the linkers are the ones in charge of combining different files of translatable object code in an executable. For this they had two fundamental tasks, the resolution of symbols and the transfer; in

The post How does a linker work? (II) – The symbol table appeared first on S3lab.

]]>
In previous posts we talked about that the linkers are the ones in charge of combining different files of translatable object code in an executable. For this they had two fundamental tasks, the resolution of symbols and the transfer; in this installment we are going to start talking about the resolution of symbols, that remember is the act of associating each reference of a symbol with its definition.

The post How does a linker work? (II) – The symbol table appeared first on S3lab.

]]>
How does a linker work? (I) http://s3lab.deusto.es/how-linker-work-1/ Tue, 11 Jul 2017 19:36:41 +0000 http://s3lab.deusto.es/?p=9265 In the process of converting the code from a high level language to an executable that understands our system, the linkers have a role that often goes unnoticed, but that is important to know. When we want to convert a

The post How does a linker work? (I) appeared first on S3lab.

]]>
In the process of converting the code from a high level language to an executable that understands our system, the linkers have a role that often goes unnoticed, but that is important to know. When we want to convert a .c file into an executable several tools come into play: first the C preprocessor (called cpp) generates an intermediate file, where, among other things, the #define directives are expanded and the comments are deleted.

The post How does a linker work? (I) appeared first on S3lab.

]]>
Hardening binaries (VI) – RELRO http://s3lab.deusto.es/hardening-binaries-6/ Sat, 04 Feb 2017 15:11:25 +0000 http://s3lab.deusto.es/?p=8840 In this post we are going to talk about two options that can happen to the linker to make certain sections of our executable more secure: -Wl, -z, relro, -z, now. When a program calls a function not defined in

The post Hardening binaries (VI) – RELRO appeared first on S3lab.

]]>
In this post we are going to talk about two options that can happen to the linker to make certain sections of our executable more secure: -Wl, -z, relro, -z, now. When a program calls a function not defined in the program, which is in a shared library, the GOT (Global Shift Table) and PLT (Procedure Linking Table) sections come into play, which are responsible for specifying where that Function we need (see this link for a more detailed explanation). For example, if we use printing in a program and look at what is happening in assembly:

The post Hardening binaries (VI) – RELRO appeared first on S3lab.

]]>