summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-07-05 20:16:34 +0000
committerobrien <obrien@FreeBSD.org>2002-07-05 20:16:34 +0000
commitf3c54bd2c1850601b80aa0558b8843517125f50f (patch)
tree30918b465d458ef1aca113937ad46b1e912ce044 /contrib/binutils/bfd/elf32-mips.c
parent18ff9f4f1bddd11c341a37177885ac89fcccedd9 (diff)
downloadFreeBSD-src-f3c54bd2c1850601b80aa0558b8843517125f50f.zip
FreeBSD-src-f3c54bd2c1850601b80aa0558b8843517125f50f.tar.gz
Import of Binutils from the FSF 2.12 branch (just post-.1 release).
These bits are taken from the FSF anoncvs repo on 22-June-2002 23:28:00 EDT.
Diffstat (limited to 'contrib/binutils/bfd/elf32-mips.c')
-rw-r--r--contrib/binutils/bfd/elf32-mips.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/contrib/binutils/bfd/elf32-mips.c b/contrib/binutils/bfd/elf32-mips.c
index e7b4701..ddfe4a0 100644
--- a/contrib/binutils/bfd/elf32-mips.c
+++ b/contrib/binutils/bfd/elf32-mips.c
@@ -105,6 +105,9 @@ struct mips_elf_link_hash_entry
/* This is like the call_stub field, but it is used if the function
being called returns a floating point value. */
asection *call_fp_stub;
+
+ /* Are we forced local? .*/
+ boolean forced_local;
};
static bfd_reloc_status_type mips32_64bit_reloc
@@ -4528,6 +4531,7 @@ mips_elf_link_hash_newfunc (entry, table, string)
ret->need_fn_stub = false;
ret->call_stub = NULL;
ret->call_fp_stub = NULL;
+ ret->forced_local = false;
}
return (struct bfd_hash_entry *) ret;
@@ -4543,7 +4547,12 @@ _bfd_mips_elf_hide_symbol (info, entry, force_local)
asection *got;
struct mips_got_info *g;
struct mips_elf_link_hash_entry *h;
+
h = (struct mips_elf_link_hash_entry *) entry;
+ if (h->forced_local)
+ return;
+ h->forced_local = true;
+
dynobj = elf_hash_table (info)->dynobj;
got = bfd_get_section_by_name (dynobj, ".got");
g = (struct mips_got_info *) elf_section_data (got)->tdata;
@@ -6047,9 +6056,18 @@ mips_elf_record_global_got_symbol (h, info, g)
{
/* A global symbol in the GOT must also be in the dynamic symbol
table. */
- if (h->dynindx == -1
- && !bfd_elf32_link_record_dynamic_symbol (info, h))
- return false;
+ if (h->dynindx == -1)
+ {
+ switch (ELF_ST_VISIBILITY (h->other))
+ {
+ case STV_INTERNAL:
+ case STV_HIDDEN:
+ _bfd_mips_elf_hide_symbol (info, h, true);
+ break;
+ }
+ if (!bfd_elf32_link_record_dynamic_symbol (info, h))
+ return false;
+ }
/* If we've already marked this entry as needing GOT space, we don't
need to do it again. */
OpenPOWER on IntegriCloud