- for (i = 0; i < objfile->num_sections; ++i)
- {
- /* syms_from_objfile kindly subtracts from addr the
- bfd_section_vma of the .text section. This strikes me as
- wrong--whether the offset to be applied to symbol reading is
- relative to the start address of the section depends on the
- symbol format. In any event, this whole "addr" concept is
- pretty broken (it doesn't handle any section but .text
- sensibly), so just ignore the addr parameter and use 0.
- rs6000-nat.c will set the correct section offsets via
- objfile_relocate. */
- (objfile->section_offsets)->offsets[i] = 0;
- }
+ if (objfile->sect_index_data == 0
+ && strcmp (first_section_name, ".data") != 0)
+ objfile->sect_index_data = -1;
+
+ if (objfile->sect_index_bss == 0
+ && strcmp (first_section_name, ".bss") != 0)
+ objfile->sect_index_bss = -1;
+
+ if (objfile->sect_index_rodata == 0
+ && strcmp (first_section_name, ".rodata") != 0)
+ objfile->sect_index_rodata = -1;