diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-06-08 15:30:52 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-06-08 15:30:52 +0000 |
commit | 3f5a136d64de776a386ed3ece67aa97645c0c619 (patch) | |
tree | 3bdce42fefe83111cf0cecc15a0a9f5f3e3c06d8 /bfd/elf.c | |
parent | 02e07694c3fb6d552d90fbd03101f75d0e707435 (diff) | |
download | gdb-3f5a136d64de776a386ed3ece67aa97645c0c619.zip gdb-3f5a136d64de776a386ed3ece67aa97645c0c619.tar.gz gdb-3f5a136d64de776a386ed3ece67aa97645c0c619.tar.bz2 |
2001-06-08 H.J. Lu <hjl@gnu.org>
* elf.c (swap_out_syms): Keep names for global section symbols.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -4394,9 +4394,9 @@ swap_out_syms (abfd, sttp, relocatable_p) flagword flags = syms[idx]->flags; int type; - if ((flags & BSF_SECTION_SYM) != 0) + if ((flags & (BSF_SECTION_SYM | BSF_GLOBAL)) == BSF_SECTION_SYM) { - /* Section symbols have no name. */ + /* Local section symbols have no name. */ sym.st_name = 0; } else @@ -4505,7 +4505,12 @@ swap_out_syms (abfd, sttp, relocatable_p) type = (*bed->elf_backend_get_symbol_type) (&type_ptr->internal_elf_sym, type); if (flags & BSF_SECTION_SYM) - sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); + { + if (flags & BSF_GLOBAL) + sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION); + else + sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); + } else if (bfd_is_com_section (syms[idx]->section)) sym.st_info = ELF_ST_INFO (STB_GLOBAL, type); else if (bfd_is_und_section (syms[idx]->section)) |