diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-03-12 23:39:18 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-03-12 23:39:18 +0000 |
commit | e3d73386d704f9fdd4c3c2bd87531cbc5f4e28d6 (patch) | |
tree | 3315be13f078607db0e3279c8a1b64bd8f3d09bc /ld/lexsup.c | |
parent | 8881b321e06d93be5b37a5504359347b0e104bf0 (diff) | |
download | gdb-e3d73386d704f9fdd4c3c2bd87531cbc5f4e28d6.zip gdb-e3d73386d704f9fdd4c3c2bd87531cbc5f4e28d6.tar.gz gdb-e3d73386d704f9fdd4c3c2bd87531cbc5f4e28d6.tar.bz2 |
* lexsup.c (parse_args): Handle --wrap.
* ldmain.c (main): Initialize link_info.wrap_hash.
* ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED
and NAME cases.
* ld.texinfo, ld.1: Document --wrap.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r-- | ld/lexsup.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c index d90b8c7..47fd2c5 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -108,7 +108,7 @@ parse_args (argc, argv) #define OPTION_SPLIT_BY_RELOC (OPTION_WARN_ONCE + 1) #define OPTION_SPLIT_BY_FILE (OPTION_SPLIT_BY_RELOC + 1) #define OPTION_WHOLE_ARCHIVE (OPTION_SPLIT_BY_FILE + 1) - +#define OPTION_WRAP (OPTION_WHOLE_ARCHIVE + 1) static struct option longopts[] = { /* Sorted alphabeticaly, except for the PE options grouped at the end. */ @@ -165,8 +165,8 @@ parse_args (argc, argv) {"split-by-reloc", required_argument, NULL, OPTION_SPLIT_BY_RELOC}, {"split-by-file", no_argument, NULL, OPTION_SPLIT_BY_FILE}, {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE}, + {"wrap", required_argument, NULL, OPTION_WRAP}, - {NULL, no_argument, NULL, 0} }; @@ -498,6 +498,20 @@ parse_args (argc, argv) case OPTION_WHOLE_ARCHIVE: whole_archive = true; break; + case OPTION_WRAP: + 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, optarg, true, true) + == NULL) + einfo ("%P%F: bfd_hash_lookup failed: %E\n"); + break; case 'X': link_info.discard = discard_l; break; |