This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI/prototype: re-implement relocs on ppc-aix


> I just mean taking the current default_symfile_offsets and changing it
> to:
> 
> ... default_symfile_offsets_base () { ...
>    everything except setting the offsets to defaults
> }
> 
> default_symfile_offsets () {
>    default_symfile_offsets_base()
>    ... set the offsets to the defaults
> }
> 
> Then your code can call default_symfile_offsets_base.

Indeed.

> Joel> +static struct obj_section *
> Joel> +data_obj_section_from_objfile (struct objfile *objfile)
> Joel> +{
> Joel> +  struct obj_section *osect;
> Joel> +
> Joel> +  ALL_OBJFILE_OSECTIONS (objfile, osect)
> Joel> + if (strcmp (bfd_section_name (objfile->obfd,
> Joel> osect->the_bfd_section),
> Joel> +		".data") == 0)
> Joel> +      return osect;
> 
> Tom> Can this not look at objfile->data_sect_index?
> 
> Joel> Not if I am understanding it right. objfile->sect_index_data is
> Joel> an index in the objfile->section_offsets array. I couldn't convince
> Joel> myself from the current documentation that those indices applied
> Joel> to both objfile->section_offsets and objfile->sections. It would be
> Joel> ideal if I could!
> 
> After the obj_section merge, they are the same.

... and it looks like the patch series is in, too. I will make that
change too. Since the change is not in 7.6, and I'd like my patch
to be reasonably applicable to that branch, I'll keep that part as
a second patch.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]