diff options
author | johannst <johannes.stoelp@gmail.com> | 2021-04-26 22:47:53 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2021-04-26 22:47:53 +0200 |
commit | fc137e7d0263a0fe908ca1a150e34a9c8b9902d4 (patch) | |
tree | f9f6768228235f4712466d65edeb0b745d904833 /04_dynld_nostd | |
parent | c05511262096681c39691ec5c3fbe30797ba7c4a (diff) | |
download | dynld-fc137e7d0263a0fe908ca1a150e34a9c8b9902d4.tar.gz dynld-fc137e7d0263a0fe908ca1a150e34a9c8b9902d4.zip |
add check for PT_TLS phdr
Diffstat (limited to '04_dynld_nostd')
-rw-r--r-- | 04_dynld_nostd/dynld.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/04_dynld_nostd/dynld.c b/04_dynld_nostd/dynld.c index 02fbe9e..6e1bebf 100644 --- a/04_dynld_nostd/dynld.c +++ b/04_dynld_nostd/dynld.c @@ -139,6 +139,8 @@ static Dso get_prog_dso(const ExecInfo* info) { } else if (phdr->type == PT_DYNAMIC) { dynoff = phdr->vaddr; } + + ERROR_ON(phdr->type == PT_TLS, "Thread local storage not supported found PT_TLS!"); } ERROR_ON(dynoff == 0, "PT_DYNAMIC entry missing in the user programs PHDR!"); @@ -311,6 +313,8 @@ static Dso map_dependency(const char* dependency) { addr_end = p->vaddr + p->memsz; } } + + ERROR_ON(phdr->type == PT_TLS, "Thread local storage not supported found PT_TLS!"); } // Align start address to the next lower page boundary. |