Fix stab support for apple

This commit is contained in:
herman ten brugge 2022-11-18 01:56:46 -06:00
parent d578151f8c
commit d605d75ba8

View file

@ -1584,6 +1584,11 @@ ST_FUNC void tcc_add_btstub(TCCState *s1)
section_ptr_add(s, 3 * PTR_SIZE);
/* prog_base : local nameless symbol with offset 0 at SHN_ABS */
put_ptr(s1, NULL, 0);
#if defined TCC_TARGET_MACHO
/* adjust for __PAGEZERO */
write64le(data_section->data + data_section->data_offset - PTR_SIZE,
(uint64_t)1 << 32);
#endif
n = 2 * PTR_SIZE;
#ifdef CONFIG_TCC_BCHECK
if (s1->do_bounds_check) {