This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[RFA:] was: Re: [RFC:] Put export_dynamics flag in struct bfd_link_info?
- To: binutils at sources dot redhat dot com
- Subject: [RFA:] was: Re: [RFC:] Put export_dynamics flag in struct bfd_link_info?
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Wed, 13 Jun 2001 18:30:41 +0200
> Date: Fri, 8 Jun 2001 10:35:13 +0930
> From: Alan Modra <amodra@bigpond.net.au>
> On Thu, Jun 07, 2001 at 06:41:06PM +0200, Hans-Peter Nilsson wrote:
> >
> > Would putting export_dynamics flag in struct bfd_link_info be
> > acceptable?
>
> Sounds like a nice clean solution to me.
Ok, here we go. I'll do it in two stages; one introducing
export_dynamic in struct bfd_link_info, and another changing
users to use that, rather than passed parameters and the linker
"command_line" structure. Here's the first piece. (Changes to
bfd/elf32-cris.c omitted.)
Ok to commit?
include:
* bfdlink.h (struct bfd_link_info): New member export_dynamic.
ld:
* lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
Set new link_info member export_dynamic.
* ldmain.c (main): Initialize new link_info member export_dynamic.
Index: include/bfdlink.h
===================================================================
RCS file: /cvs/src/src/include/bfdlink.h,v
retrieving revision 1.9
diff -c -p -r1.9 bfdlink.h
*** bfdlink.h 2001/04/13 00:34:36 1.9
--- bfdlink.h 2001/06/13 16:15:19
*************** struct bfd_link_info
*** 191,196 ****
--- 191,199 ----
boolean shared;
/* true if BFD should pre-bind symbols in a shared object. */
boolean symbolic;
+ /* true if BFD should export all symbols in the dynamic symbol table
+ of an executable, rather than only those used. */
+ boolean export_dynamic;
/* true if shared objects should be linked directly, not shared. */
boolean static_link;
/* true if the output file should be in a traditional format. This
Index: ld/ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.22
diff -c -p -r1.22 ldmain.c
*** ldmain.c 2001/05/23 17:26:39 1.22
--- ldmain.c 2001/06/13 16:15:21
*************** main (argc, argv)
*** 219,224 ****
--- 219,225 ----
link_info.emitrelocations = false;
link_info.shared = false;
link_info.symbolic = false;
+ link_info.export_dynamic = false;
link_info.static_link = false;
link_info.traditional_format = false;
link_info.optimize = false;
Index: ld/lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.34
diff -c -p -r1.34 lexsup.c
*** lexsup.c 2001/05/22 14:00:18 1.34
--- lexsup.c 2001/06/13 16:15:22
*************** parse_args (argc, argv)
*** 667,672 ****
--- 667,673 ----
case OPTION_EXPORT_DYNAMIC:
case 'E': /* HP/UX compatibility. */
command_line.export_dynamic = true;
+ link_info.export_dynamic = true;
break;
case 'e':
lang_add_entry (optarg, true);
brgds, H-P