bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21903] --no-define-common causes internal error in elf_link_conv


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/21903] --no-define-common causes internal error in elf_link_convert_common_type
Date: Sun, 06 Aug 2017 15:38:54 +0000

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

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <address@hidden>:

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

commit a4819f54c0006554179631189131080be859eefb
Author: H.J. Lu <address@hidden>
Date:   Sun Aug 6 08:18:53 2017 -0700

    Treat common symbol as undefined for --no-define-common

    When --no-define-common is used to build shared library, treat common
    symbol as undefined so that common symbols that are referenced from a
    shared library to be assigned addresses only in the main program.  This
    eliminates the unused duplicate space in the shared library, and also
    prevents any possible confusion over resolving to the wrong duplicate
    when there are many dynamic modules with specialized search paths for
    runtime symbol resolution.

    --no-define-common is only allowed when building a shared library.

    bfd/

        PR ld/21903:
        * elflink.c (elf_link_add_object_symbols): Treat common symbol
        as undefined for --no-define-common.

    include/

        PR ld/21903:
        * bfdlink.h (bfd_link_info): Add inhibit_common_definition.

    ld/

        PR ld/21903:
        * ld.h (command_line): Remove inhibit_common_definition.
        * ldgram.y: Replace command_line.inhibit_common_definition with
        link_info.inhibit_common_definition.
        * ldlang.c (lang_common): Likewise.
        * lexsup.c (parse_args): Likewise.
        * ldmain.c (main): Only allow --no-define-common with -shared.
        * testsuite/ld-elf/pr21903.s: New file.
        * testsuite/ld-elf/pr21903a.d: Likewise.
        * testsuite/ld-elf/pr21903b.d: Likewise.
        * testsuite/ld-elf/pr21903c.d: Likewise.
        * testsuite/ld-elf/pr21903d.d: Likewise.
        * testsuite/ld-elf/pr21903e.d: Likewise.

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