aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-08-02 22:31:18 +0000
committerRichard Henderson <rth@redhat.com>1999-08-02 22:31:18 +0000
commit1fa0ddb30b4401475d6a055946cc20909d0a9c21 (patch)
tree247938aefd95bd66a0a4a0da0fb7f51f0781ed2a /bfd/elflink.h
parent7a12753dad0addccb0f795b46ab9f12d5ac42f5c (diff)
downloadgdb-1fa0ddb30b4401475d6a055946cc20909d0a9c21.zip
gdb-1fa0ddb30b4401475d6a055946cc20909d0a9c21.tar.gz
gdb-1fa0ddb30b4401475d6a055946cc20909d0a9c21.tar.bz2
Jakub Jelinek <jj@ultra.linux.cz>
* elflink.h (elf_bfd_final_link): Copy the whole isym, not just some fields. * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used variables and initialize them.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index cfb4909..7b3a417 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -4250,19 +4250,12 @@ elf_bfd_final_link (abfd, info)
{
asection *s;
- sym.st_size = e->isym.st_size;
- sym.st_other = e->isym.st_other;
-
- /* Note that we saved a word of storage and overwrote
+ /* Copy the internal symbol as is.
+ Note that we saved a word of storage and overwrote
the original st_name with the dynstr_index. */
- sym.st_name = e->isym.st_name;
+ sym = e->isym;
- if (e->isym.st_shndx == 0 || e->isym.st_shndx >= SHN_LORESERVE)
- {
- sym.st_shndx = e->isym.st_shndx;
- sym.st_value = e->isym.st_value;
- }
- else
+ if (e->isym.st_shndx > 0 && e->isym.st_shndx < SHN_LORESERVE)
{
s = bfd_section_from_elf_index (e->input_bfd,
e->isym.st_shndx);