From 3cfaaaf1eb97d858e583412616f68f75fdad5da5 Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Wed, 5 Aug 2020 13:55:11 +0200 Subject: [PATCH] Fix dll on arm. Do not output the arm stack unwinding section (SHT_ARM_EXIDX). --- tccelf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tccelf.c b/tccelf.c index 5e4c7daf..ff83eb45 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1794,6 +1794,13 @@ static int alloc_sec_names(TCCState *s1, int file_type, Section *strsec) /* we output all sections if debug or object file */ s->sh_size = s->data_offset; } +#ifdef TCC_TARGET_ARM + /* XXX: Suppress stack unwinding section. */ + if (s->sh_type == SHT_ARM_EXIDX) { + s->sh_flags = 0; + s->sh_size = 0; + } +#endif if (s->sh_size || (s->sh_flags & SHF_ALLOC)) s->sh_name = put_elf_str(strsec, s->name); }