bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21900] [MIPS] linking shared library with -z defs --warn-unresol


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/21900] [MIPS] linking shared library with -z defs --warn-unresolved-symbols emits null relocation
Date: Sat, 03 Mar 2018 15:53:03 +0000

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Maciej W. Rozycki <address@hidden>:

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

commit dfb93f11587ca08b820c7c785278366f2505cfd1
Author: James Cowgill <address@hidden>
Date:   Sat Mar 3 15:49:21 2018 +0000

    PR ld/21900: MIPS: Fix relocation processing with undefined symbols

    Currently, when `mips_elf_calculate_relocation' is asked to relocate an
    undefined symbol, it reports an error or a warning and immediately
    returns without performing the relocation.  This is fine if the link
    fails, but if unresolved_syms_in_objects == RM_GENERATE_WARNING, the
    link will continue and output some unrelocated code, which is a
    regression from commit e7e2196da3f0 ("MIPS/BFD: Correctly report
    undefined relocations").

    Fix this by continuing after calling the `undefined_symbol' hook unless
    this is an error condition.

        bfd/
        PR ld/21900
        * elfxx-mips.c (mips_elf_calculate_relocation): Only return
        after calling `undefined_symbol' hook if this is an error
        condition.  Assume the value of 0 for the symbol requested
        otherwise.

        ld/
        PR ld/21900
        * testsuite/ld-mips-elf/undefined-warn.d: New test.
        * testsuite/ld-mips-elf/undefined.s: Add padding at the end.
        * testsuite/ld-mips-elf/mips-elf.exp: Run the new test.

-- 
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]