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: hjl.tools at gmail dot com
Subject: [Bug ld/21903] --no-define-common causes internal error in elf_link_convert_common_type
Date: Fri, 04 Aug 2017 11:33:57 +0000

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-08-04
                 CC|                            |hjl.tools at gmail dot com
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
There is no testcase for --no-define-common.  Linker manual says:

'--no-define-common'
     This option inhibits the assignment of addresses to common symbols.
     The script command 'INHIBIT_COMMON_ALLOCATION' has the same effect.
     *Note Miscellaneous Commands::.

     The '--no-define-common' option allows decoupling the decision to
     assign addresses to Common symbols from the choice of the output
     file type; otherwise a non-Relocatable output type forces assigning
     addresses to Common symbols.  Using '--no-define-common' allows
     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.

It is unclear if common symbol should be treated as undefined in this
case.  Also is this option only allowed for building shared library?

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