diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-02-06 21:34:44 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-02-06 21:34:44 +0000 |
commit | 0bef7f7266e0fd2d5dd66a2fa9203ca5c22d2be1 (patch) | |
tree | 01be69ebbee7342c6d997298e8c1374818d4afe0 /bfd | |
parent | 484a0896941851de1453eec8e08719b20362880a (diff) | |
download | gdb-0bef7f7266e0fd2d5dd66a2fa9203ca5c22d2be1.zip gdb-0bef7f7266e0fd2d5dd66a2fa9203ca5c22d2be1.tar.gz gdb-0bef7f7266e0fd2d5dd66a2fa9203ca5c22d2be1.tar.bz2 |
* libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define.
* elfcode.h (elf_link_add_object_symbols): Don't clear or set
ELF_LINK_HASH_DEFINED_WEAK.
(elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfcode.h | 15 | ||||
-rw-r--r-- | bfd/libelf.h | 6 |
3 files changed, 8 insertions, 18 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0b3194b..717d6c9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ Mon Feb 6 14:25:24 1995 Ian Lance Taylor <ian@cygnus.com> + * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define. + * elfcode.h (elf_link_add_object_symbols): Don't clear or set + ELF_LINK_HASH_DEFINED_WEAK. + (elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK. + Distinguish a weak defined symbol from a regular defined symbol. * linker.c (enum link_action): Add DEFW. (link_action): Add bfd_link_hash_defweak column. diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 0e61bb3..a99b1d9 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -4435,19 +4435,7 @@ elf_link_add_object_symbols (abfd, info) with the new definition. */ h->root.type = bfd_link_hash_undefined; h->root.u.undef.abfd = h->root.u.def.section->owner; - h->elf_link_hash_flags &=~ ELF_LINK_HASH_DEFINED_WEAK; } - - /* If this is a weak definition which we are going to use, - and the symbol is currently undefined, record that the - definition is weak. */ - if (definition - && (flags & BSF_WEAK) != 0 - && ! bfd_is_und_section (sec) - && (h->root.type == bfd_link_hash_new - || h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak)) - h->elf_link_hash_flags |= ELF_LINK_HASH_DEFINED_WEAK; } if (! (_bfd_generic_link_add_one_symbol @@ -6100,8 +6088,7 @@ elf_link_output_extsym (h, data) sym.st_size = h->size; sym.st_other = 0; if (h->root.type == bfd_link_hash_undefweak - || h->root.type == bfd_link_hash_defweak - || (h->elf_link_hash_flags & ELF_LINK_HASH_DEFINED_WEAK) != 0) + || h->root.type == bfd_link_hash_defweak) sym.st_info = ELF_ST_INFO (STB_WEAK, h->type); else sym.st_info = ELF_ST_INFO (STB_GLOBAL, h->type); diff --git a/bfd/libelf.h b/bfd/libelf.h index d732bef..349f9fa 100644 --- a/bfd/libelf.h +++ b/bfd/libelf.h @@ -117,12 +117,10 @@ struct elf_link_hash_entry #define ELF_LINK_HASH_DEF_DYNAMIC 010 /* Dynamic symbol has been adjustd. */ #define ELF_LINK_HASH_DYNAMIC_ADJUSTED 020 - /* Symbol is defined as weak. */ -#define ELF_LINK_HASH_DEFINED_WEAK 040 /* Symbol needs a copy reloc. */ -#define ELF_LINK_HASH_NEEDS_COPY 0100 +#define ELF_LINK_HASH_NEEDS_COPY 040 /* Symbol needs a procedure linkage table entry. */ -#define ELF_LINK_HASH_NEEDS_PLT 0200 +#define ELF_LINK_HASH_NEEDS_PLT 0100 }; /* ELF linker hash table. */ |