From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19536 invoked by alias); 8 Jun 2006 14:40:38 -0000 Received: (qmail 19525 invoked by uid 22791); 8 Jun 2006 14:40:36 -0000 X-Spam-Check-By: sourceware.org Received: from bender.bawue.de (HELO bender.bawue.de) (193.7.176.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Jun 2006 14:40:32 +0000 Received: from lagash (unknown [194.74.144.146]) by bender.bawue.de (Postfix) with ESMTP id E8C844511C for ; Thu, 8 Jun 2006 16:40:27 +0200 (MEST) Received: from ths by lagash with local (Exim 4.62) (envelope-from ) id 1FoLfz-0004xD-I8 for binutils@sourceware.org; Thu, 08 Jun 2006 15:39:59 +0100 Date: Thu, 08 Jun 2006 17:05:00 -0000 To: binutils@sourceware.org Subject: [PATCH] Some missing PAGESIZE bit for MIPS Message-ID: <20060608143959.GA4357@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060403 From: Thiemo Seufer X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00101.txt.bz2 Hello All, this patch has the following effects: - It changes the maximum pagesize for IRIX6 NewABI to 64kb, following the native tools. - It adjusts a testcase to follow the recent reduction of maximum page sizes for o32 by H.J. (from 256k to 64k). - It adds missing COMMONPAGESIZE definitions to the n64 configurations. Comments? Thiemo 2006-06-08 Thiemo Seufer [ bfd/ChangeLog ] * elf32-mips.c: Expand comment about ABI-mandated pagesize values. (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): define in a more obvious way. * elf64-mips.c, elfn32-mips.c (ELF_MAXPAGESIZE): Fix value for IRIX6. Delete old comments. (ELF_COMMONPAGESIZE): Define in a more obvious way. [ ld/ChangeLog ] * emulparams/elf64bmip.sh, emulparams/elf64btsmip.sh (COMMONPAGESIZE): Define. [ ld/testsuite/ChangeLog ] * ld-mips-elf/multi-got-no-shared.d: Adjust for recent change of ELF_MAXPAGESIZE. Index: bfd/elf32-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-mips.c,v retrieving revision 1.188 diff -u -p -r1.188 elf32-mips.c --- bfd/elf32-mips.c 30 May 2006 16:45:31 -0000 1.188 +++ bfd/elf32-mips.c 8 Jun 2006 14:16:23 -0000 @@ -1610,15 +1610,20 @@ static const struct ecoff_debug_swap mip #undef TARGET_BIG_NAME #undef ELF_MAXPAGESIZE +#undef ELF_COMMONPAGESIZE #define TARGET_LITTLE_SYM bfd_elf32_tradlittlemips_vec #define TARGET_LITTLE_NAME "elf32-tradlittlemips" #define TARGET_BIG_SYM bfd_elf32_tradbigmips_vec #define TARGET_BIG_NAME "elf32-tradbigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses - page sizes of up to that limit, so we need to respect it. */ +/* The MIPS ABI says at Page 5-1: + Virtual addresses and file offsets for MIPS segments are congruent + modulo 64 KByte (0x10000) or larger powers of 2. Because 64 KBytes + is the maximum page size, the files are suitable for paging + regardless of physical page size. */ #define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x1000 #define elf32_bed elf32_tradbed /* Include the target file again for this target. */ @@ -1703,6 +1708,9 @@ mips_vxworks_final_write_processing (bfd #undef TARGET_BIG_SYM #undef TARGET_BIG_NAME +#undef ELF_MAXPAGESIZE +#undef ELF_COMMONPAGESIZE + #define TARGET_LITTLE_SYM bfd_elf32_littlemips_vxworks_vec #define TARGET_LITTLE_NAME "elf32-littlemips-vxworks" #define TARGET_BIG_SYM bfd_elf32_bigmips_vxworks_vec @@ -1711,8 +1719,8 @@ mips_vxworks_final_write_processing (bfd #undef elf32_bed #define elf32_bed elf32_mips_vxworks_bed -#undef ELF_MAXPAGESIZE #define ELF_MAXPAGESIZE 0x1000 +#define ELF_COMMONPAGESIZE 0x1000 #undef elf_backend_want_got_plt #define elf_backend_want_got_plt 1 Index: bfd/elf64-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elf64-mips.c,v retrieving revision 1.73 diff -u -p -r1.73 elf64-mips.c --- bfd/elf64-mips.c 23 Nov 2005 14:04:17 -0000 1.73 +++ bfd/elf64-mips.c 8 Jun 2006 14:16:23 -0000 @@ -3152,10 +3152,8 @@ extern bfd_boolean bfd_elf64_archive_wri #define TARGET_BIG_SYM bfd_elf64_bigmips_vec #define TARGET_BIG_NAME "elf64-bigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses - a value of 0x1000, and we are compatible. - FIXME: How does this affect NewABI? */ -#define ELF_MAXPAGESIZE 0x1000 +#define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x1000 #include "elf64-target.h" @@ -3166,15 +3164,15 @@ extern bfd_boolean bfd_elf64_archive_wri #undef TARGET_BIG_NAME #undef ELF_MAXPAGESIZE +#undef ELF_COMMONPAGESIZE #define TARGET_LITTLE_SYM bfd_elf64_tradlittlemips_vec #define TARGET_LITTLE_NAME "elf64-tradlittlemips" #define TARGET_BIG_SYM bfd_elf64_tradbigmips_vec #define TARGET_BIG_NAME "elf64-tradbigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses - page sizes of up to that limit, so we need to respect it. */ #define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x1000 #define elf64_bed elf64_tradbed /* Include the target file again for this target. */ Index: bfd/elfn32-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elfn32-mips.c,v retrieving revision 1.31 diff -u -p -r1.31 elfn32-mips.c --- bfd/elfn32-mips.c 30 May 2006 16:45:31 -0000 1.31 +++ bfd/elfn32-mips.c 8 Jun 2006 14:16:23 -0000 @@ -2380,10 +2380,7 @@ static const struct ecoff_debug_swap mip #define TARGET_BIG_SYM bfd_elf32_nbigmips_vec #define TARGET_BIG_NAME "elf32-nbigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses - a value of 0x1000, and we are compatible. - FIXME: How does this affect NewABI? */ -#define ELF_MAXPAGESIZE 0x1000 +#define ELF_MAXPAGESIZE 0x10000 #define ELF_COMMONPAGESIZE 0x1000 #include "elf32-target.h" @@ -2395,15 +2392,15 @@ static const struct ecoff_debug_swap mip #undef TARGET_BIG_NAME #undef ELF_MAXPAGESIZE +#undef ELF_COMMONPAGESIZE #define TARGET_LITTLE_SYM bfd_elf32_ntradlittlemips_vec #define TARGET_LITTLE_NAME "elf32-ntradlittlemips" #define TARGET_BIG_SYM bfd_elf32_ntradbigmips_vec #define TARGET_BIG_NAME "elf32-ntradbigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses - page sizes of up to that limit, so we need to respect it. */ #define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x1000 #define elf32_bed elf32_tradbed /* Include the target file again for this target. */ Index: ld/emulparams/elf64bmip.sh =================================================================== RCS file: /cvs/src/src/ld/emulparams/elf64bmip.sh,v retrieving revision 1.9 diff -u -p -r1.9 elf64bmip.sh --- ld/emulparams/elf64bmip.sh 8 Apr 2004 14:52:44 -0000 1.9 +++ ld/emulparams/elf64bmip.sh 8 Jun 2006 14:16:26 -0000 @@ -3,6 +3,7 @@ OUTPUT_FORMAT="elf64-bigmips" BIG_OUTPUT_FORMAT="elf64-bigmips" LITTLE_OUTPUT_FORMAT="elf64-littlemips" SHLIB_TEXT_START_ADDR=0x3ffffe0000 +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" # IRIX6 defines these symbols. 0x40 is the size of the ELF header. EXECUTABLE_SYMBOLS=" Index: ld/emulparams/elf64btsmip.sh =================================================================== RCS file: /cvs/src/src/ld/emulparams/elf64btsmip.sh,v retrieving revision 1.11 diff -u -p -r1.11 elf64btsmip.sh --- ld/emulparams/elf64btsmip.sh 13 Oct 2003 19:48:39 -0000 1.11 +++ ld/emulparams/elf64btsmip.sh 8 Jun 2006 14:16:26 -0000 @@ -5,6 +5,7 @@ OUTPUT_FORMAT="elf64-tradbigmips" BIG_OUTPUT_FORMAT="elf64-tradbigmips" LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" # Magic sections. OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' Index: ld/testsuite/ld-mips-elf/multi-got-no-shared.d =================================================================== RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/multi-got-no-shared.d,v retrieving revision 1.2 diff -u -p -r1.2 multi-got-no-shared.d --- ld/testsuite/ld-mips-elf/multi-got-no-shared.d 18 Aug 2005 16:46:22 -0000 1.2 +++ ld/testsuite/ld-mips-elf/multi-got-no-shared.d 8 Jun 2006 14:16:26 -0000 @@ -8,11 +8,11 @@ .*: +file format.* Disassembly of section \.text: -004000b0 <[^>]*> 3c1c0046 lui gp,0x46 +004000b0 <[^>]*> 3c1c0043 lui gp,0x43 004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592 004000b8 <[^>]*> afbc0008 sw gp,8\(sp\) #... -00408d60 <[^>]*> 3c1c0047 lui gp,0x47 +00408d60 <[^>]*> 3c1c0044 lui gp,0x44 00408d64 <[^>]*> 279cb960 addiu gp,gp,-18080 00408d68 <[^>]*> afbc0008 sw gp,8\(sp\) #pass