Fix dll on arm.

Do not output the arm stack unwinding section (SHT_ARM_EXIDX).
This commit is contained in:
herman ten brugge 2020-08-05 13:55:11 +02:00
parent a0a0f4d029
commit 3cfaaaf1eb

View File

@ -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);
}