aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-09-20 10:37:35 +0000
committerNick Clifton <nickc@redhat.com>2001-09-20 10:37:35 +0000
commit671bae9c9235974d21f45571a12ff64fae238017 (patch)
tree7fa7d989fe133434f07ff7f59715b01a4427c060 /bfd
parent3a42e9d0622736d6ad84c37a2d4f4f54a0c30469 (diff)
downloadgdb-671bae9c9235974d21f45571a12ff64fae238017.zip
gdb-671bae9c9235974d21f45571a12ff64fae238017.tar.gz
gdb-671bae9c9235974d21f45571a12ff64fae238017.tar.bz2
coordinate info->symbolic and info->allow_shlib_undefined
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog20
-rw-r--r--bfd/elf32-cris.c2
-rw-r--r--bfd/elf32-hppa.c2
-rw-r--r--bfd/elf32-i386.c3
-rw-r--r--bfd/elf32-m68k.c3
-rw-r--r--bfd/elf32-mips.c4
-rw-r--r--bfd/elf32-ppc.c4
-rw-r--r--bfd/elf32-s390.c3
-rw-r--r--bfd/elf32-sh.c4
-rw-r--r--bfd/elf32-sparc.c3
-rw-r--r--bfd/elf64-alpha.c3
-rw-r--r--bfd/elf64-hppa.c5
-rw-r--r--bfd/elf64-ppc.c4
-rw-r--r--bfd/elf64-s390.c3
-rw-r--r--bfd/elf64-sparc.c3
-rw-r--r--bfd/elf64-x86-64.c4
-rw-r--r--bfd/elfxx-ia64.c8
17 files changed, 59 insertions, 19 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e2fb365..2a39f18 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,23 @@
+2001-09-20 John Reiser <jreiser@BitWagon.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): coordinate info->symbolic
+ and info->allow_shlib_undefined.
+ * elf32-cris.c: likewise
+ * elf32-hppa.c: likewise
+ * elf32-m68k.c: likewise
+ * elf32-mips.c: likewise
+ * elf32-ppc.c: likewise
+ * elf32-s390.c: likewise
+ * elf32-sh.c: likewise
+ * elf32-sparc.c: likewise
+ * elf64-alpha.c: likewise
+ * elf64-hppa.c: likewise
+ * elf64-ppc.c: likewise
+ * elf64-s390.c: likewise
+ * elf64-sparc.c: likewise
+ * elf64-x86-64.c: likewise
+ * elfxx-ia64.c: likewise
+
2001-09-18 Bruno Haible <haible@clisp.cons.org>
* aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index eb9a6f4..0a94c12f 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -898,7 +898,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
else if (info->shared
- && !info->symbolic
+ && (!info->symbolic || info->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 68a956c..a774782 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3679,7 +3679,7 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
&& 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)))
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 93dfa5e..82c17ce 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1549,7 +1549,8 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
;
- 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)
;
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 33de899..d381be9 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1474,7 +1474,8 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
}
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;
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 1554cce..14bce73 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -6142,7 +6142,9 @@ mips_elf_calculate_relocation (abfd,
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 ||
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 392d4fd..8e7ccd4 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3106,7 +3106,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
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
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 873f8b6..64e873c 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1444,7 +1444,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
}
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;
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index e835156..f8d29d1 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3114,7 +3114,9 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
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
{
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 1707830..93141a8 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1237,7 +1237,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
}
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;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 79cebc1..00d8184 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -3346,7 +3346,8 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.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->root.other) == STV_DEFAULT)
relocation = 0;
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index d09a93f..98d6888 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -746,7 +746,8 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs)
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = false;
- if (h && ((info->shared && ! info->symbolic)
+ if (h && ((info->shared
+ && (!info->symbolic || info->allow_shlib_undefined) )
|| ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| h->root.type == bfd_link_hash_defweak))
maybe_dynamic = true;
@@ -973,7 +974,7 @@ elf64_hppa_dynamic_symbol_p (h, info)
if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$')
return false;
- if ((info->shared && !info->symbolic)
+ if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
|| ((h->elf_link_hash_flags
& (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
== (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index d5a340d..78e9815 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2847,7 +2847,9 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
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
{
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 65041a6..7bc6429 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1432,7 +1432,8 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
}
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;
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 0742e22..f5ba083 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2069,7 +2069,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
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;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 24eb9f7..0b8d345 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1300,7 +1300,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
}
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
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 4ba4665..d8f1de7 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -1429,7 +1429,7 @@ elfNN_ia64_dynamic_symbol_p (h, info)
|| h->root.type == bfd_link_hash_defweak)
return true;
- if ((info->shared && !info->symbolic)
+ if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
|| ((h->elf_link_hash_flags
& (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
== (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
@@ -2020,7 +2020,8 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = false;
- if (h && ((info->shared && ! info->symbolic)
+ if (h && ((info->shared
+ && (!info->symbolic || info->allow_shlib_undefined))
|| ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| h->root.type == bfd_link_hash_defweak
|| elfNN_ia64_aix_vec (abfd->xvec)))
@@ -3509,7 +3510,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
undef_weak_ref = true;
- 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)
;