diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-06-18 19:46:56 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-06-18 19:46:56 +0200 |
commit | 2e3b0deae9e367e4fb35982981ae18c54235260a (patch) | |
tree | 3fea4295790a608605c087c0032a1b632880e575 /content/2019-11-18-dynamic-linking-linux-x86_64.md | |
parent | 394366cf1c32aae428e588b262a9dc365d897a70 (diff) | |
download | blog-2e3b0deae9e367e4fb35982981ae18c54235260a.tar.gz blog-2e3b0deae9e367e4fb35982981ae18c54235260a.zip |
fix zola check issues
Diffstat (limited to 'content/2019-11-18-dynamic-linking-linux-x86_64.md')
-rw-r--r-- | content/2019-11-18-dynamic-linking-linux-x86_64.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/2019-11-18-dynamic-linking-linux-x86_64.md b/content/2019-11-18-dynamic-linking-linux-x86_64.md index bc39e0f..496ec24 100644 --- a/content/2019-11-18-dynamic-linking-linux-x86_64.md +++ b/content/2019-11-18-dynamic-linking-linux-x86_64.md @@ -141,7 +141,7 @@ int main(int argc, const char* argv[]) { } ``` -```console +```bash > gcc -o main main.c -no-pie ``` @@ -209,7 +209,7 @@ To understand the `push 0` instruction in the **puts** trampoline we have to take a look at the third section of interest in the ELF file, the `.rela.plt` section. -```console +``` # -r print relocations # -D use .dynamic info when displaying info > readelf -W -r ./main @@ -250,7 +250,7 @@ The resulting index [2] is the offset into the dynamic symbol table (`.dynsym`). Dumping the dynamic symbol table with readelf we can see that the symbol at index [2] is **puts**. -```console +``` # -s print symbols > readelf -W -s ./main Symbol table '.dynsym' contains 7 entries: @@ -300,7 +300,7 @@ Following entries are most interesting for dynamic linking: We can use readelf to dump the `.dynamic` section. In the following snippet I only kept the relevant entries: -```console +``` # -d dump .dynamic section > readelf -d ./main |