Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/gnu/usr.bin/ld/ld Pull up revision 1.73 (requested by m...
details: https://anonhg.NetBSD.org/src/rev/3a006ba00e3f
branches: netbsd-1-4
changeset: 471233:3a006ba00e3f
user: he <he%NetBSD.org@localhost>
date: Sun Jan 21 17:07:26 2001 +0000
description:
Pull up revision 1.73 (requested by mycroft):
The options --whole-archive and --no-whole-archive should be
position-dependent. Make them actually behave that way.
diffstat:
gnu/usr.bin/ld/ld/ld.c | 41 ++++++++++++++++++-----------------------
1 files changed, 18 insertions(+), 23 deletions(-)
diffs (97 lines):
diff -r 95e72b6f3557 -r 3a006ba00e3f gnu/usr.bin/ld/ld/ld.c
--- a/gnu/usr.bin/ld/ld/ld.c Wed Jan 17 16:37:46 2001 +0000
+++ b/gnu/usr.bin/ld/ld/ld.c Sun Jan 21 17:07:26 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ld.c,v 1.64.2.2 2000/11/04 22:15:22 he Exp $ */
+/* $NetBSD: ld.c,v 1.64.2.3 2001/01/21 17:07:26 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -88,7 +88,7 @@
#ifndef lint
/* from: "@(#)ld.c 6.10 (Berkeley) 5/22/91"; */
-__RCSID("$NetBSD: ld.c,v 1.64.2.2 2000/11/04 22:15:22 he Exp $");
+__RCSID("$NetBSD: ld.c,v 1.64.2.3 2001/01/21 17:07:26 he Exp $");
#endif /* not lint */
#define GNU_BINUTIL_COMPAT /* forwards compatiblity with binutils 2.x */
@@ -762,6 +762,8 @@
if (code == 0) {
p->filename = argv[i];
p->local_sym_name = argv[i];
+ if (link_mode & FORCEARCHIVE)
+ p->flags |= E_FORCE_ARCHIVE;
p++;
continue;
}
@@ -787,8 +789,12 @@
else if (strcmp(string, "~silly") == 0)
link_mode &= ~SILLYARCHIVE;
#endif
- }
- if (argv[i][1] == 'A') {
+ } else if (argv[i][1] == '-') {
+ if (strcmp(string, "whole-archive") == 0)
+ link_mode |= FORCEARCHIVE;
+ else if (strcmp(string, "no-whole-archive") == 0)
+ link_mode &= ~FORCEARCHIVE;
+ } else if (argv[i][1] == 'A') {
if (p != file_table)
errx(1, "-A specified before an input file other than the first");
p->filename = string;
@@ -796,13 +802,14 @@
p->flags |= E_JUST_SYMS;
link_mode &= ~DYNAMIC;
p++;
- }
- if (argv[i][1] == 'l') {
+ } else if (argv[i][1] == 'l') {
p->filename = string;
p->local_sym_name = concat("-l", string, "");
p->flags |= E_SEARCH_DIRS;
if (link_mode & DYNAMIC && !relocatable_output)
p->flags |= E_SEARCH_DYNAMIC;
+ if (link_mode & FORCEARCHIVE)
+ p->flags |= E_FORCE_ARCHIVE;
p++;
}
i += code - 1;
@@ -879,32 +886,20 @@
return;
if (!strcmp(swt + 1, "Bforcearchive"))
return;
- if (!strcmp(swt + 1, "Bshareable")) {
- if (warn_obsolete_syntax)
- warnx("-Bshareable: obsolete syntax");
+ if (!strcmp(swt + 1, "Bshareable"))
return;
- }
if (!strcmp(swt + 1, "assert"))
return;
#ifdef GNU_BINUTIL_COMPAT
- if (strcmp(swt + 1, "-export-dynamic") == 0) {
+ if (!strcmp(swt + 1, "-export-dynamic")) {
if (warn_forwards_compatible_inexact)
- warnx("%s ignored", swt + 1);
+ warnx("-export-dynamic ignored");
return;
}
- if (strcmp(swt + 1, "-whole-archive") == 0) {
- /* XXX incomplete emulation */
- link_mode |= FORCEARCHIVE;
- if (warn_forwards_compatible_inexact)
- warnx("-no-whole-archive treated as -Bshareable");
+ if (!strcmp(swt + 1, "-whole-archive"))
return;
- }
- if (strcmp(swt + 1, "-no-whole-archive") == 0) {
- /* XXX incomplete emulation */
- if (warn_forwards_compatible_inexact)
- warnx("-no-whole-archive ignored");
+ if (!strcmp(swt + 1, "-no-whole-archive"))
return;
- }
if (strcmp(swt + 1, "shared") == 0) {
link_mode |= SHAREABLE;
#ifdef DEBUG_COMPAT
Home |
Main Index |
Thread Index |
Old Index