~netblock-deactivatedaccount/ubuntu/natty/binutils/rtems-support

« back to all changes in this revision

Viewing changes to ld/ldlang.c

  • Committer: Alin Rus
  • Date: 2011-02-07 23:58:49 UTC
  • Revision ID: alin.codejunkie@gmail.com-20110207235849-pp34i2nehvqaa8nw
rtems patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
4788
4788
            bfd_vma newdot, after;
4789
4789
            lang_output_section_statement_type *os;
4790
4790
            lang_memory_region_type *r;
 
4791
            int section_alignment = 0;
4791
4792
 
4792
4793
            os = &s->output_section_statement;
4793
4794
            if (os->constraint == -1)
4857
4858
              }
4858
4859
            else
4859
4860
              {
4860
 
                int align;
4861
 
 
4862
4861
                if (os->addr_tree == NULL)
4863
4862
                  {
4864
4863
                    /* No address specified for this section, get one
4909
4908
                      }
4910
4909
 
4911
4910
                    newdot = os->region->current;
4912
 
                    align = os->bfd_section->alignment_power;
 
4911
                    section_alignment = os->bfd_section->alignment_power;
4913
4912
                  }
4914
4913
                else
4915
 
                  align = os->section_alignment;
 
4914
                  section_alignment = os->section_alignment;
4916
4915
 
4917
4916
                /* Align to what the section needs.  */
4918
 
                if (align > 0)
 
4917
                if (section_alignment > 0)
4919
4918
                  {
4920
4919
                    bfd_vma savedot = newdot;
4921
 
                    newdot = align_power (newdot, align);
 
4920
                    newdot = align_power (newdot, section_alignment);
4922
4921
 
4923
4922
                    if (newdot != savedot
4924
4923
                        && (config.warn_section_align
4974
4973
              {
4975
4974
                bfd_vma lma = os->lma_region->current;
4976
4975
 
4977
 
                if (os->section_alignment != -1)
4978
 
                  lma = align_power (lma, os->section_alignment);
 
4976
                if (section_alignment > 0)
 
4977
                  lma = align_power (lma, section_alignment);
4979
4978
                os->bfd_section->lma = lma;
4980
4979
              }
4981
4980
            else if (r->last_os != NULL
5016
5015
                    else
5017
5016
                      lma = dot + last->lma - last->vma;
5018
5017
 
5019
 
                    if (os->section_alignment != -1)
5020
 
                      lma = align_power (lma, os->section_alignment);
 
5018
                    if (section_alignment > 0)
 
5019
                      lma = align_power (lma, section_alignment);
5021
5020
                    os->bfd_section->lma = lma;
5022
5021
                  }
5023
5022
              }