tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2


From: grischka
Subject: Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2
Date: Sat, 17 Nov 2012 15:57:23 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]