source: scripts/patch/binutils/2.19.1/15-orphan_section.patch@ 36e3b69

sysvinit
Last change on this file since 36e3b69 was 914669c, checked in by Jim Gifford <clfs@…>, 15 years ago

Updated Binutils Patch. Added Patches to fix Issues with Powerpc

  • Property mode set to 100644
File size: 1.5 KB
  • ld/ldlang.c

    old new output_prev_sec_find (lang_output_sectio  
    16151615   idea is to skip over anything that might be inside a SECTIONS {}
    16161616   statement in a script, before we find another output section
    16171617   statement.  Assignments to "dot" before an output section statement
    1618    are assumed to belong to it.  An exception to this rule is made for
    1619    the first assignment to dot, otherwise we might put an orphan
    1620    before . = . + SIZEOF_HEADERS or similar assignments that set the
    1621    initial address.  */
     1618   are assumed to belong to it, except in two cases;  The first
     1619   assignment to dot, and assignments before non-alloc sections.
     1620   Otherwise we might put an orphan before . = . + SIZEOF_HEADERS or
     1621   similar assignments that set the initial address, or we might
     1622   insert non-alloc note sections among assignments setting end of
     1623   image symbols.  */
    16221624
    16231625static lang_statement_union_type **
    16241626insert_os_after (lang_output_section_statement_type *after)
    insert_os_after (lang_output_section_sta  
    16621664          continue;
    16631665        case lang_output_section_statement_enum:
    16641666          if (assign != NULL)
    1665             where = assign;
     1667            {
     1668              asection *s = (*where)->output_section_statement.bfd_section;
     1669
     1670              if (s == NULL || (s->flags & SEC_ALLOC) != 0)
     1671                where = assign;
     1672            }
    16661673          break;
    16671674        case lang_input_statement_enum:
    16681675        case lang_address_statement_enum:
Note: See TracBrowser for help on using the repository browser.