aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-02-01 23:15:23 +0000
committerIan Lance Taylor <ian@airs.com>1996-02-01 23:15:23 +0000
commit869b7d80d3988e8677d9da2337313d98e2895aad (patch)
treea55114afd3cdc9395ba17cfc8518b80699fc3811 /bfd/elf.c
parent626a6542ec68cdc8c7763f0cf2cbaeedd6799be3 (diff)
downloadgdb-869b7d80d3988e8677d9da2337313d98e2895aad.zip
gdb-869b7d80d3988e8677d9da2337313d98e2895aad.tar.gz
gdb-869b7d80d3988e8677d9da2337313d98e2895aad.tar.bz2
* elf-bfd.h (ELF_LINK_NON_ELF): Define.
* elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to ELF_LINK_NON_ELF. * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF flag for a newly defined symbol. (NAME(bfd_elf,record_link_assignment)): Likewise. (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to set the DEF or REF_REGULAR flags correctly.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index be1cbc8..4313d5e 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -556,7 +556,11 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
ret->plt_offset = (bfd_vma) -1;
ret->linker_section_pointer = (elf_linker_section_pointers_t *)0;
ret->type = STT_NOTYPE;
- ret->elf_link_hash_flags = 0;
+ /* Assume that we have been called by a non-ELF symbol reader.
+ This flag is then reset by the code which reads an ELF input
+ file. This ensures that a symbol created by a non-ELF symbol
+ reader will have the flag set correctly. */
+ ret->elf_link_hash_flags = ELF_LINK_NON_ELF;
}
return (struct bfd_hash_entry *) ret;