diff options
author | Thiemo Seufer <ths@networkno.de> | 2004-07-30 23:56:04 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2004-07-30 23:56:04 +0000 |
commit | 00b4930b6b1ea557e9ce6e127f3f95dcef44cf78 (patch) | |
tree | 76fbb0ebd6e099570b0a7ee69f253898c8fa3c92 /bfd/elfxx-mips.c | |
parent | dc8566929cf7298314e47fbda9e8a6592b73c18a (diff) | |
download | gdb-00b4930b6b1ea557e9ce6e127f3f95dcef44cf78.zip gdb-00b4930b6b1ea557e9ce6e127f3f95dcef44cf78.tar.gz gdb-00b4930b6b1ea557e9ce6e127f3f95dcef44cf78.tar.bz2 |
* elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
SHN_MIPS_TEXT and SHN_MIPS_DATA.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index a18ac84..3505f62 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -4192,15 +4192,37 @@ _bfd_mips_elf_symbol_processing (bfd *abfd, asymbol *asym) asym->section = bfd_und_section_ptr; break; -#if 0 /* for SGI_COMPAT */ case SHN_MIPS_TEXT: - asym->section = mips_elf_text_section_ptr; + { + asection *section = bfd_get_section_by_name (abfd, ".text"); + + BFD_ASSERT (SGI_COMPAT (abfd)); + if (section != NULL) + { + asym->section = section; + /* MIPS_TEXT is a bit special, the address is not an offset + to the base of the .text section. So substract the section + base address to make it an offset. */ + asym->value -= section->vma; + } + } break; case SHN_MIPS_DATA: - asym->section = mips_elf_data_section_ptr; + { + asection *section = bfd_get_section_by_name (abfd, ".data"); + + BFD_ASSERT (SGI_COMPAT (abfd)); + if (section != NULL) + { + asym->section = section; + /* MIPS_DATA is a bit special, the address is not an offset + to the base of the .data section. So substract the section + base address to make it an offset. */ + asym->value -= section->vma; + } + } break; -#endif } } |