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: [GOLD][PATCH] Remove Output_section::Simple_input_section class.


Cary Coutant <ccoutant@google.com> writes:

>>> We use off_t for data_size() in Output_data and its sub-classes. Â I
>>> changed this to make it consistent. ÂI agree that uint32_t is
>>> sufficient for ARM and will change this.
>>
>> Oh yeah. ÂThat dates back to when I created output.h. ÂIt should
>> probably change at some point.
>
> To what -- section_size_type and section_offset_type? Or, for sized
> classes, something that's sized for the target?

Templated classes should normally use the appropriate templated size.

In output.h the size of a section should probably be uint64_t.

section_size_type and section_offset_type are for sections which need
to be loaded into memory, such as merge sections or symtab sections.
I introduced it so that we could use 32-bit sizes on 32-bit hosts,
since that made a measurable improvement in link time.  But there is
no restriction on the size of a section which is not loaded into
memory.

This is different from Output_data::offset(), which is an offset
within the file, and should continue to be off_t.  When off_t is
32-bits then you just can't build a file larger than 4G, and there is
nothing to be done about it.  Of course, the size of a SHT_NOBITS
section could still be larger than 4G.

Ian


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