bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12942] Plugin not handling correctly resolution of COMDATs.


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/12942] Plugin not handling correctly resolution of COMDATs.
Date: Tue, 28 Oct 2014 06:44:39 +0000

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

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, binutils-2_25-branch has been updated
       via  a809b386e59dfcb3f4dedd8465975dabc55db5db (commit)
       via  2609fe3d3f84ce62b373daa56ba615465c2d5293 (commit)
       via  334efb9a97018d8b2f508e5c22e5acb7b824cc76 (commit)
       via  35ac6b6a54f9be85dd9794fa6645fac3631e510b (commit)
      from  7cc2a6b6a4c63cba363836475052a71e0387e621 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit a809b386e59dfcb3f4dedd8465975dabc55db5db
Author: Alan Modra <address@hidden>
Date:   Tue Oct 21 20:44:38 2014 +1030

    Relax ppc64_elf_tls_optimize assertion

    The code in ppc64_elf_tls_optimize looking at the .toc is only
    interested in .toc entries that are addresses.  .toc can contain more
    than just an array of addresses, so if we have items that aren't
    8-byte aligned, ignore them.

        * elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc
        entries that aren't a multiple of 8 rather than failing assertion.

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

commit 2609fe3d3f84ce62b373daa56ba615465c2d5293
Author: Jan Beulich <address@hidden>
Date:   Tue Oct 21 09:56:38 2014 +0200

    ppc: enable msgclr and msgsnd on Power8

    According to my reading of the spec it was an oversight for them to
    not having got enabled when Power8 support got added.

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

commit 334efb9a97018d8b2f508e5c22e5acb7b824cc76
Author: Alan Modra <address@hidden>
Date:   Tue Oct 21 17:06:01 2014 +1030

    Add gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7

    powerpc64 ld builds plt call stubs with a read barrier to provide
    thread safety on lazy plt updates, necessary on multi-threaded apps
    with power7 or later weakly ordered memory.  gcc-4.9 libgomp
    introduced more functions that could call pthread_create, which means
    we have more functions that if referenced in an executable should
    cause a default of --plt-thread-safe.

    bfd/
        * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
        to thread_starter.
    gold/
        * powerpc.cc (do_relax): Add gcc-4.9 libgomp functions to
        thread_starter.

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

commit 35ac6b6a54f9be85dd9794fa6645fac3631e510b
Author: Alan Modra <address@hidden>
Date:   Sat Oct 18 21:46:48 2014 +1030

    PowerPC64 ELFv1 function symbol definition vs LTO and discarded sections

    When functions are emitted in comdat groups, global symbols defined in
    duplicates of the group are treated as if they were undefined.  That
    prevents the symbols in the discarded sections from affecting the
    linker's global symbol hash table or causing duplicate symbol errors.
    Annoyingly, when gcc emits a function to a comdat group, it does not
    put *all* of a function's code and data in the comdat group.
    Typically, constant tables, exception handling info, and debug info
    are emitted to normal sections outside of the group, which is a
    perennial source of linker problems due to the special handling needed
    to deal with the extra-group pieces that ought to be discarded.  In
    the case of powerpc64-gcc, the OPD entry for a function is not put in
    the group.  Since the function symbol is defined on the OPD entry this
    means we need to handle symbols in .opd specially.

    To see how this affects LTO in particular, consider the linker
    testcase PR ld/12942 (1).  This testcase links an LTO object file
    pr12942a.o with a normal (non-LTO) object pr12942b.o.  Both objects
    contain a definition for _Z4testv in a comdat group.  On loading
    pr12942a.o, the linker sees a comdat group (actually linkonce section)
    for _Z4testv and a weak _Z4testv defined in the IR.  On loading
    pr12942b.o, the linker sees the same comdat group, and thus discards
    it.  However, _Z4testv is a weak symbol defined in .opd, not part of
    the group, so this weak symbol overrides the weak IR symbol.  On
    (re)loading the LTO version of pr12942a.o, the linker sees another
    weak _Z4testv, but this one does not override the value we have from
    pr12942b.o.  The result is a linker complaint about "`_Z4testv'
    ... defined in discarded section `.group' of tmpdir/pr12942b.o".

        * elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
        section for function symbols defined in .opd is discarded, let
        the symbol appear to be undefined.
        (opd_entry_value): Ensure the result section is that for the
        function code section in the same object as the OPD entry.

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                  |   15 +++++
 bfd/elf64-ppc.c                |  116 +++++++++++++++++++++++++---------------
 gas/testsuite/ChangeLog        |    4 ++
 gas/testsuite/gas/ppc/power8.d |    2 +
 gas/testsuite/gas/ppc/power8.s |    2 +
 gold/ChangeLog                 |    7 +++
 gold/powerpc.cc                |    6 ++
 opcodes/ChangeLog              |    6 ++
 opcodes/ppc-opc.c              |    4 +-
 9 files changed, 116 insertions(+), 46 deletions(-)

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