aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-03-26 23:16:01 +0000
committerIan Lance Taylor <ian@airs.com>1996-03-26 23:16:01 +0000
commit28113e82bd6a33795a87c0988cf0ca85c308793d (patch)
tree2ab7d30098334134ba71d9096c1bbde74daba145 /ld/ldmain.c
parentfd681dcdafbaf623900ef0fb704a25618148b548 (diff)
downloadgdb-28113e82bd6a33795a87c0988cf0ca85c308793d.zip
gdb-28113e82bd6a33795a87c0988cf0ca85c308793d.tar.gz
gdb-28113e82bd6a33795a87c0988cf0ca85c308793d.tar.bz2
* ldmain.c (main): Call bfd_set_error_program_name.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 6d78e27..1096368 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -162,6 +162,8 @@ main (argc, argv)
bfd_init ();
+ bfd_set_error_program_name (program_name);
+
xatexit (remove_output);
/* Initialize the data about options. */
@@ -515,6 +517,25 @@ add_ysym (name)
einfo ("%P%F: bfd_hash_lookup failed: %E\n");
}
+/* Record a symbol to be wrapped, from the --wrap option. */
+
+void
+add_wrap (name)
+ const char *name;
+{
+ if (link_info.wrap_hash == NULL)
+ {
+ link_info.wrap_hash = ((struct bfd_hash_table *)
+ xmalloc (sizeof (struct bfd_hash_table)));
+ if (! bfd_hash_table_init_n (link_info.wrap_hash,
+ bfd_hash_newfunc,
+ 61))
+ einfo ("%P%F: bfd_hash_table_init failed: %E\n");
+ }
+ if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
+ einfo ("%P%F: bfd_hash_lookup failed: %E\n");
+}
+
/* Handle the -retain-symbols-file option. */
void