This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -shared && -static


Hi H. J., Hi Jeff,

You made the change
http://sourceware.org/ml/binutils-cvs/2004-12/msg00106.html

I couldn't find any discussions on this.

I'm sure that it was a PR, but I cannot find it in the database or mailing lists. :-(


> I think Jeff is correct. -static is independent of -shared.

I agree. I was wrong when I made that change. I am checking in the attached patch to revert my change and also explicitly mention in the description of the -static switch that it can be used with -shared.

Cheers
  Nick

ld/ChangeLog
2005-07-29  Nick Clifton  <nickc@redhat.com>

	* ldmain.c (main): Allow -shared and -static to be used together.
	* ld.texinfo (-static): Mention that it is allowed with -shared.

Index: ld/ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.100
diff -c -3 -p -r1.100 ldmain.c
*** ld/ldmain.c	19 Jul 2005 21:41:03 -0000	1.100
--- ld/ldmain.c	29 Jul 2005 13:30:25 -0000
*************** main (int argc, char **argv)
*** 345,353 ****
  	einfo (_("%P%F: -r and -shared may not be used together\n"));
      }
  
-   if (!config.dynamic_link && link_info.shared)
-     einfo (_("%P%F: -static and -shared may not be used together\n"));
- 
    if (! link_info.shared)
      {
        if (command_line.filter_shlib)
--- 345,350 ----
Index: ld/ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.143
diff -c -3 -p -r1.143 ld.texinfo
*** ld/ld.texinfo	12 Jun 2005 18:38:39 -0000	1.143
--- ld/ld.texinfo	29 Jul 2005 13:30:27 -0000
*************** platforms for which shared libraries are
*** 1077,1083 ****
  variants of this option are for compatibility with various systems.  You
  may use this option multiple times on the command line: it affects
  library searching for @option{-l} options which follow it.  This
! option also implies @option{--unresolved-symbols=report-all}.
  
  @kindex -Bsymbolic
  @item -Bsymbolic
--- 1077,1087 ----
  variants of this option are for compatibility with various systems.  You
  may use this option multiple times on the command line: it affects
  library searching for @option{-l} options which follow it.  This
! option also implies @option{--unresolved-symbols=report-all}.  This
! option can be used with @option{-shared}.  Doing so means that a
! shared library is being created but that all of the library's external
! references must be resolved by pulling in entries from static
! libraries. 
  
  @kindex -Bsymbolic
  @item -Bsymbolic

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]