bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/19870] New: description of -shared option doesn't match that in


From: britton.kerin at gmail dot com
Subject: [Bug ld/19870] New: description of -shared option doesn't match that in gcc manual
Date: Sat, 26 Mar 2016 23:00:13 +0000

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

            Bug ID: 19870
           Summary: description of -shared option doesn't match that in
                    gcc manual
           Product: binutils
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: britton.kerin at gmail dot com
  Target Milestone: ---

In https://sourceware.org/binutils/docs/ld/Options.html#Options (section 2.1):

-shared
-Bshareable
    Create a shared library. This is currently only supported on ELF, XCOFF and
SunOS platforms. On SunOS, the linker will automatically create a shared
library if the -e option is not used and there are undefined symbols in the
link. 


In https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Link-Options.html#Link-Options
(secion 3.13):

-shared
    Produce a shared object which can then be linked with other objects to form
an executable. Not all systems support this option. For predictable results,
you must also specify the same set of options used for compilation (-fpic,
-fPIC, or model suboptions) when you specify this linker option.

My understanding is that gcc invokes ld to implement link-time options,
so these options are presumably ultimately triggering the same code and
have the same requirements.  The description in GCC describes an important
requirement for linker invocations using -shared (that -fpic or -fPIC etc. be
provided if they were used at compile time).  The binutile ld documentation
should do so also (assuming this requirement is itself correct).

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