summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-07-31 00:14:49 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-07-31 00:14:49 +0000
commita1e6770c4829d122b0737c1eebdc278cd5904450 (patch)
treef100ec6c6de09633ca2ecb9adbc7ecc490e9b750
parenta63d58a220a2af9535be692d8407a44431e3b8ff (diff)
downloadbinutils-redhat-jimb-gdb_6_2-e500-branch.tar.gz
* elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handlejimb-gdb_6_2-e500-branchgdb_6_2-branch
SHN_MIPS_TEXT and SHN_MIPS_DATA.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elfxx-mips.c30
2 files changed, 32 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b300f86917..c1c44706fc 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-31 Joel Brobecker <brobecker@gnat.com>
+ Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
+ SHN_MIPS_TEXT and SHN_MIPS_DATA.
+
2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR 240
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index a18ac84107..3505f62fbf 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
}
}