This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Overlap error not generated for sections w/o content
On Mon, Jan 12, 2004 at 20:58:45 +1030 Alan Modra wrote:
>
> On Mon, Jan 12, 2004 at 11:37:06AM +0200, Galit Heller wrote:
> > However, the case which originally triggered my question still stands:
> >
> > when an output section is created via the statement:
> >
> > .section_name : { . += 600; }
> >
> > then .section_name does not have SEC_ALLOC flag set (and thus no overlap
> > error is reported for this section).
>
> We can't really do anything about this. !SEC_ALLOC && !SEC_LOAD
> sections are typically used for debug sections. If we started checking
> these, they would all clash.
Of course. The question is whether SEC_ALLOC could be automatically set
for a section in which dot is incremented, as is done in lang_size_sections_1
for output sections whose statement consists of an output section data
expression
e.g. .section_name : { BYTE(0); } .
I realize that the latter case is a more clear cut indication of the section
needing to be allocated.
Thanks,
Galit.