This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change bfd_link_hash_entry.type to a bitfield?


"H.J. Lu" <hjl.tools@gmail.com> writes:
> On Wed, Apr 20, 2011 at 6:57 PM, Alan Modra <amodra@gmail.com> wrote:
>> How do people feel about poking some flags into bfd_link_hash_entry?
>> This can be done without increasing the size of the struct, since
>> "type" is an unsigned int but only needs 3 bits. ÂThe negative side is
>> that hosts without efficient byte read access will see a linker
>> slowdown. Â"type" is the most used field of bfd_link_hash_entry.
>> On the positive side, this would allow the linker lto plugin code to
>> lose a potentially very large symbol hash table. ÂAlso, other fields
>> from elf_link_hash_entry and coff_link_hash_entry could move into
>> bfd_link_hash_entry, reducing the size of the linker hash table.
>>
>
> I like it,

+1.  How about defining ENUM_BITFIELD in ansidecl.h, so that other
headers could use it too?

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]