bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linu


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/26869] ld: assertion fail ../../bfd/elflink.c:14806 on i686-linux-gnu since 382aae06322799a25ea52fe61b243cbca4db8d66
Date: Mon, 16 Nov 2020 14:46:38 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26869

--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The binutils-2_35-branch branch has been updated by H.J. Lu
<hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff

commit 1767e3f3bd6d460491f8c8d032a7fea88d5ec8ff
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Nov 16 06:37:53 2020 -0800

    elf: Set rel_from_abs to 1 for __ehdr_start

    bfdlink.h has

      /* Symbol will be converted from absolute to section-relative.  Set for
         symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
         outside of an output section statement.  */
      unsigned int rel_from_abs : 1;

    linker.c has

    .{* Return TRUE if the symbol described by a linker hash entry H
    .   is going to be absolute.  Linker-script defined symbols can be
    .   converted from absolute to section-relative ones late in the
    .   link.  Use this macro to correctly determine whether the symbol
    .   will actually end up absolute in output.  *}
    .#define bfd_is_abs_symbol(H) \
    .  (((H)->type == bfd_link_hash_defined \
    .    || (H)->type == bfd_link_hash_defweak) \
    .   && bfd_is_abs_section ((H)->u.def.section) \
    .   && !(H)->rel_from_abs)
    .

    Set rel_from_abs to 1 for __ehdr_start which will be converted from
    absolute to section-relative in assign_file_positions_for_load_sections.

            PR ld/26869
            * ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
            __ehdr_start.
            * testsuite/ld-i386/i386.exp: Run pr26869.
            * testsuite/ld-i386/pr26869.d: New file.
            * testsuite/ld-i386/pr26869.s: Likewise.

    (cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]