From: John Reiser <jreiser@BitWagon.com>
To: binutils@sourceware.cygnus.com
Subject: [PATCH] Re: ld: orthogonal functionality?
Date: Wed, 19 Sep 2001 09:07:00 -0000 [thread overview]
Message-ID: <3BA8C31F.D957F04C@BitWagon.com> (raw)
In-Reply-To: <m3iterhri6.fsf@north-pole.nickc.cambridge.redhat.com>
Here is an integration of -Bsymbolic and --allow-shlib-undefined
with diffs against the latest release binutils-2.11.2.
The i386 version has been tested, but not the others.
=====
2001-09-19 John Reiser <jreiser@BitWagon.com>
* elf32-i386.c (elf_i386_relocate_section): coordinate info->symbolic
and info->allow_shlib_undefined.
* elf32-hppa.c: likewise
* elf32-m68k.c: likewise
* elf32-mips.c: likewise
* elf32-ppc.c: likewise
* elf32-sh.c: likewise
* elf32-sparc.c: likewise
===== binutils-2.11.2/bfd
--- elf32-hppa.c.orig Mon Jun 11 03:04:10 2001
+++ elf32-hppa.c Wed Sep 19 08:40:19 2001
@@ -3662,7 +3662,7 @@
&& ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
&& h->elf.type != STT_PARISC_MILLI)
{
- if (info->symbolic)
+ if (info->symbolic && !info->allow_shlib_undefined)
if (!((*info->callbacks->undefined_symbol)
(info, h->elf.root.root.string, input_bfd,
input_section, rel->r_offset, false)))
--- elf32-i386.c.orig Mon Jun 11 03:04:10 2001
+++ elf32-i386.c Wed Sep 19 08:35:26 2001
@@ -1465,7 +1465,8 @@
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
--- elf32-m68k.c.orig Wed Jun 6 20:08:24 2001
+++ elf32-m68k.c Wed Sep 19 08:41:54 2001
@@ -1490,7 +1490,8 @@
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
--- elf32-mips.c.orig Mon Jun 11 03:04:11 2001
+++ elf32-mips.c Wed Sep 19 08:53:09 2001
@@ -6136,7 +6136,9 @@
and check to see if they exist by looking at their
addresses. */
symbol = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
symbol = 0;
else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0 ||
--- elf32-ppc.c.orig Wed Jun 6 20:08:25 2001
+++ elf32-ppc.c Wed Sep 19 08:53:34 2001
@@ -3102,7 +3102,9 @@
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
--- elf32-sh.c.orig Wed Jun 6 20:08:25 2001
+++ elf32-sh.c Wed Sep 19 08:44:16 2001
@@ -3006,7 +3006,9 @@
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined)
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
+ && !info->no_undefined )
relocation = 0;
else
{
--- elf32-sparc.c.orig Mon Jun 11 03:04:13 2001
+++ elf32-sparc.c Wed Sep 19 08:44:52 2001
@@ -1241,7 +1241,8 @@
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
=====
--
John Reiser, jreiser@BitWagon.com
next prev parent reply other threads:[~2001-09-19 9:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-07 8:56 John Reiser
2001-09-10 10:43 ` Nick Clifton
2001-09-19 9:07 ` John Reiser [this message]
2001-09-19 9:13 ` [PATCH] " H . J . Lu
2001-09-19 10:53 ` John Reiser
2001-09-19 12:14 ` John Reiser
2001-09-24 23:38 ` Where can I add "-lm" flag to compile tc-*.c jw c
2001-09-25 11:55 ` optionally postpone assignment of Common John Reiser
2001-09-25 19:13 ` Alan Modra
2001-09-25 21:13 ` John Reiser
2001-09-29 5:58 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3BA8C31F.D957F04C@BitWagon.com \
--to=jreiser@bitwagon.com \
--cc=binutils@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).