Thomas Preud'homme wrote:
Except that it doesn't work for alloc_sym_attr. To be able to do ->got_offset the type returned must be the one of sym_attrs.
>
I thus propose to create struct sym_attr.
Yeah, so your patch wouldn't be much shorter. Anyway the ability to store additional attributes with the Elf symbols might be useful for other purposes in future too. I've already thought about in the past whether 'struct Sym' should have a member 'struct AttributeDef', which maybe is the only way to do some things more cleanly but would waste some memory, because local symbols don't have additional attributes usually. Then again global symbols always have an associated Elf entry. So maybe this 'struct sym_attr' can be the solution to this problem. Also, the recently added 'sym->asm_label' looks like a candidate for being moved from Sym to sym_attr. --- grischka _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
