From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12332 invoked by alias); 10 Jun 2013 18:01:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 12294 invoked by uid 89); 10 Jun 2013 18:01:24 -0000 X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS,TW_FX autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from mail-ea0-f174.google.com (HELO mail-ea0-f174.google.com) (209.85.215.174) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 10 Jun 2013 18:01:23 +0000 Received: by mail-ea0-f174.google.com with SMTP id o10so2483274eaj.33 for ; Mon, 10 Jun 2013 11:01:21 -0700 (PDT) X-Received: by 10.14.203.7 with SMTP id e7mr12408116eeo.118.1370887281115; Mon, 10 Jun 2013 11:01:21 -0700 (PDT) Received: from localhost ([2.26.203.247]) by mx.google.com with ESMTPSA id 3sm24675537een.7.2013.06.10.11.01.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Jun 2013 11:01:20 -0700 (PDT) From: Richard Sandiford To: "Maciej W. Rozycki" Mail-Followup-To: "Maciej W. Rozycki" ,Joel Brobecker , Catherine Moore , , , rdsandiford@googlemail.com Cc: Joel Brobecker , Catherine Moore , , Subject: Re: [PATCH 1/2] MIPS: Compressed PLT/stubs support References: <87621mwt3l.fsf@talisman.default> <87ehfozyhg.fsf@talisman.default> <8761xo981a.fsf@talisman.default> Date: Mon, 10 Jun 2013 18:08:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Mon, 10 Jun 2013 17:59:29 +0100") Message-ID: <87wqq17slt.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-06/txt/msg00233.txt.bz2 "Maciej W. Rozycki" writes: > 2013-06-10 Maciej W. Rozycki > > bfd/ > * elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New > prototype. > * elf32-mips.c (elf_backend_plt_sym_val): Remove macro. > (bfd_elf32_get_synthetic_symtab): New macro. > * elfxx-mips.c (plt_entry): New structure. > (mips_elf_link_hash_entry): Add use_plt_entry member. > (mips_elf_link_hash_table): Rename plt_entry_size member to > plt_mips_entry_size. Add plt_comp_entry_size, plt_mips_offset, > plt_comp_offset, plt_got_index entries and plt_header_is_comp > members. > (STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros. > (STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise. > (STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise. > (STUB_LI16S_MICROMIPS): Likewise. > (MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise. > (MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise. > (micromips_o32_exec_plt0_entry): New variable. > (mips16_o32_exec_plt_entry): Likewise. > (micromips_o32_exec_plt_entry): Likewise. > (mips_elf_link_hash_newfunc): Initialize use_plt_entry. > (mips_elf_output_extsym): Update to use gotplt_union's plist > member rather than offset. > (mips_elf_gotplt_index): Likewise. Remove the VxWorks > restriction. Use MIPS_ELF_GOT_SIZE to calculate GOT address. > (mips_elf_count_got_symbols): Update to use gotplt_union's plist > member rather than offset. > (mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT > entries. > (_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes > here. > (mips_elf_make_plt_record): New function. > (_bfd_mips_elf_check_relocs): Update comment. Record occurences > of JAL relocations that might need a PLT entry. > (_bfd_mips_elf_adjust_dynamic_symbol): Update to use > gotplt_union's plist member rather than offset. Set individual > PLT entry sizes here. Handle MIPS16/microMIPS PLT entries. > Don't set the symbol's value in the symbol table for PLT > references here. Don't set the PLT or PLT GOT section sizes > here. > (mips_elf_estimate_stub_size): Handle microMIPS stubs. > (mips_elf_allocate_lazy_stub): Likewise. > (mips_elf_lay_out_lazy_stubs): Likewise. Define a _MIPS_STUBS_ > magic symbol. > (mips_elf_set_plt_sym_value): New function. > (_bfd_mips_elf_size_dynamic_sections): Set PLT header size and > PLT and PLT GOT section sizes here. Set the symbol values in > the symbol table for PLT references here. Handle microMIPS > annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol. > (_bfd_mips_elf_finish_dynamic_symbol): Update to use > gotplt_union's plist member rather than offset. Handle > MIPS16/microMIPS PLT entries. Handle microMIPS stubs. > (_bfd_mips_vxworks_finish_dynamic_symbol): Update to use > gotplt_union's plist member rather than offset. Use > MIPS_ELF_GOT_SIZE to calculate GOT address. > (mips_finish_exec_plt): Handle microMIPS PLT. Return status. > (_bfd_mips_elf_finish_dynamic_sections): Handle result from > mips_finish_exec_plt. > (_bfd_mips_elf_link_hash_table_create): Update to use > gotplt_union's plist member rather than offset. > (_bfd_mips_elf_get_synthetic_symtab): New function. > > include/elf/ > * mips.h (ELF_ST_IS_MIPS_PLT): Respect STO_MIPS16 setting. > (ELF_ST_SET_MIPS_PLT): Likewise. > > gdb/ > * mips-tdep.c (mips_elf_make_msymbol_special): Handle MIPS16 and > microMIPS synthetic symbols. > > ld/ > * emulparams/elf32btsmip.sh: Arrange for .got.plt to be placed > as close to .plt as possible. > * scripttempl/elf.sc: Handle $INITIAL_READWRITE_SECTIONS and > $PLT_NEXT_DATA variables. > > ld/testsuite/ > * ld-mips-elf/jalx-2.dd: Update for microMIPS PLT support. > * ld-mips-elf/pic-and-nonpic-3a.dd: Update for the _MIPS_STUBS_ > magic symbol. > * ld-mips-elf/pic-and-nonpic-3b.dd: Likewise. > * ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise. > * ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise. > * ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise. > * ld-mips-elf/stub-dynsym-1-10000.d: Likewise. > * ld-mips-elf/stub-dynsym-1-2fe80.d: Likewise. > * ld-mips-elf/stub-dynsym-1-7fff.d: Likewise. > * ld-mips-elf/stub-dynsym-1-8000.d: Likewise. > * ld-mips-elf/stub-dynsym-1-fff0.d: Likewise. > * ld-mips-elf/tlslib-o32.d: Likewise. > > opcodes/ > * mips-dis.c (is_mips16_plt_tail): New function. > (print_insn_mips16): Handle MIPS16 PLT entry's GOT slot address > word. > (is_compressed_mode_p): Handle MIPS16/microMIPS PLT entries. OK for the binutils bits. Thanks, Richard