os->processed_vma = TRUE;
if (bfd_is_abs_section (os->bfd_section) || os->ignored)
- {
- if (os->bfd_section->size > 0)
- {
- /* PR ld/3107: Do not abort when a buggy linker script
- causes a non-empty section to be discarded. */
- if (bfd_is_abs_section (os->bfd_section))
- einfo (_("%P%X: internal error: attempting to take the size of the non-section *ABS*\n"));
- else
- einfo (_("%P: warning: discarding non-empty, well known section %A\n"),
- os->bfd_section);
- }
- }
+ /* Except for some special linker created sections,
+ no output section should change from zero size
+ after strip_excluded_output_sections. A non-zero
+ size on an ignored section indicates that some
+ input section was not sized early enough. */
+ ASSERT (os->bfd_section->size == 0);
else
{
dot = os->bfd_section->vma;