This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: powerpc gold work in progress
On Fri, Aug 10, 2012 at 6:18 AM, Alan Modra <amodra@gmail.com> wrote:
>
> * object.h (Sized_relobj_file::find_shdr): New function.
> (Sized_relobj_file::find_special_sections): New function.
> * object.cc (Sized_relobj_file::find_shdr): New function.
> (Sized_relobj_file::find_eh_frame): Use find_shdr.
> (Sized_relobj_file::find_special_sections): New function, split out..
> (Sized_relobj_file::do_read_symbols): ..from here.
> * output.h (Output_data_got::replace_constant): New function.
> (Output_data_got::num_entries): New function.
> (Output_data_got::last_got_offset,set_got_size): Use num_entries.
> (Output_data_got::got_offset): Protected rather than private.
> (Output_data_got::replace_got_entry): New function.
> * output.cc (Output_data_got::replace_got_entry): New function.
> * powerpc.cc (class Powerpc_relobj): New.
> (class Powerpc_relocate_functions): Delete all psymval variants or
> convert to value,addend type. Delete pcrela, pcrela_unaligned.
> Implement _ha functions using corresponding _hi function.
> (Powerpc_relobj::find_special_sections): New function.
> (Target_powerpc::do_make_elf_object): New function.
> (class Output_data_got_powerpc): New.
> (class Output_data_glink): New.
> (class Powerpc_scan_relocatable_reloc): New.
> Many more changes throughout file.
> + s = this->find_shdr(pshdrs, ".got2", names, names_size, NULL);
> + if (s != NULL)
> + {
> + unsigned int ndx = (s - pshdrs) / elfcpp::Elf_sizes<size>::shdr_size;
> + this->set_got2_shndx (ndx);
No space before left parenthesis in C++ (I know, it's awful).
> +class Powerpc_scan_relocatable_reloc
> +{
> +public:
> + // Return the strategy to use for a local symbol which is not a
> + // section symbol, given the relocation type.
> + inline Relocatable_relocs::Reloc_strategy
> + local_non_section_strategy(unsigned int r_type, Relobj*, unsigned int r_sym)
> + {
> + // We assume that relocation type 0 is NONE. Targets which are
> + // different must override.
This comment doesn't mean anything here, and can be removed.
This is OK with those changes.
Thanks.
Ian