From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25410 invoked by alias); 11 Aug 2012 00:09:20 -0000 Received: (qmail 25398 invoked by uid 22791); 11 Aug 2012 00:09:15 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_YM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Aug 2012 00:09:02 +0000 Received: by pbbro12 with SMTP id ro12so3899032pbb.0 for ; Fri, 10 Aug 2012 17:09:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-system-of-record:x-gm-message-state; bh=IddDWOKQDCqt0+/PPq/KHJeZYOISueBzS4UWxXUtfjo=; b=KIPfYwWT1WXw3RhkBnIUe2rcVQ4ko7KqxANG6cVu6ymPr43m4ZMwIhBC/e0pycrH34 IITchEGLbCoAoGZYXXUyPcSmSWukEexDm5yvDVkzuMGSgA3/fL9+vrdTf3e9wdrsSJ9U xnZtB/s3BmGaEJ8bgVitB8VHmDqSJbih6nE26lYgR6v2NYlQ4tk79JvTkBkIxOaXSHjK oEkY84L/fpeR4Xca13Ml0d8RoMljEyzuzqGknUw7R3F3oIX8Z98eMUrQS99G3SRI5uhz Uhd/4nB6Mb9x7ihCvJfxDCTY4RFNN7Ur5qbtxzlIiJrarSB02uonkL2tpsH8OQReNhmI NcFg== Received: by 10.68.231.130 with SMTP id tg2mr16361046pbc.70.1344643742228; Fri, 10 Aug 2012 17:09:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.231.130 with SMTP id tg2mr16361033pbc.70.1344643742091; Fri, 10 Aug 2012 17:09:02 -0700 (PDT) Received: by 10.68.8.9 with HTTP; Fri, 10 Aug 2012 17:09:02 -0700 (PDT) In-Reply-To: <20120810131816.GA5588@bubble.grove.modra.org> References: <20120809132716.GB30412@bubble.grove.modra.org> <20120810131816.GA5588@bubble.grove.modra.org> Date: Sat, 11 Aug 2012 03:52:00 -0000 Message-ID: Subject: Re: powerpc gold work in progress From: Ian Lance Taylor To: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQniddJDO1lxvfnmsLQeh3AaBQQKxvnokhS+2MH0bUpP7hS2XkzKqmAeLumHk1NEcJwfD/7WfHeCpsrwfznI9KNlQzZnb55e6yh1FFo6eM+DV3QhhlgNK9vF/uQ8sS4FrNmuR2y4aJBRmxBhr2xpLFdhz4c2bI+Q9HBF8PBDDv5LCXYk5wfrswSK72emA8Sw8M2RYh/F X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00198.txt.bz2 On Fri, Aug 10, 2012 at 6:18 AM, Alan Modra 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::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