From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6010 invoked by alias); 1 Mar 2005 09:47:38 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 5991 invoked from network); 1 Mar 2005 09:47:31 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 1 Mar 2005 09:47:31 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j219lVc6003307 for ; Tue, 1 Mar 2005 04:47:31 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j219lUK05690; Tue, 1 Mar 2005 04:47:30 -0500 Received: from [172.31.0.98] (vpnuser6.surrey.redhat.com [172.16.9.6]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j219lSZc025917; Tue, 1 Mar 2005 09:47:29 GMT Message-ID: <42243CE5.1030504@redhat.com> Date: Tue, 01 Mar 2005 09:47:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) MIME-Version: 1.0 To: Eric Christopher CC: Brett Porter , seufer@csv.ica.uni-stuttgart.de, binutils@sources.redhat.com Subject: Re: MIPS gas doesn't set SH_FLAG References: <5.1.0.14.0.20050223142247.01c54d50@sherlock> <4223544F.7000407@redhat.com> <1109639860.16067.9.camel@localhost.localdomain> In-Reply-To: <1109639860.16067.9.camel@localhost.localdomain> Content-Type: multipart/mixed; boundary="------------020301030904050004040709" X-SW-Source: 2005-03/txt/msg00013.txt.bz2 This is a multi-part message in MIME format. --------------020301030904050004040709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 175 Hi Eric, Hi Brett, Hi Thiemo, > ChangeLogs look good, how about that patch? :) I could have sworn that I attached the file. Oh well... Here it is again. Cheers Nick --------------020301030904050004040709 Content-Type: text/plain; name="mips.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mips.patch" Content-length: 2999 Index: bfd/elfxx-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elfxx-mips.c,v retrieving revision 1.124 diff -c -3 -p -r1.124 elfxx-mips.c *** bfd/elfxx-mips.c 23 Feb 2005 11:39:14 -0000 1.124 --- bfd/elfxx-mips.c 28 Feb 2005 17:01:12 -0000 *************** _bfd_mips_elf_fake_sections (bfd *abfd, *** 4578,4583 **** --- 4578,4587 ---- name = bfd_get_section_name (abfd, sec); + /* If the user has specified any MIPS specific + flags then make sure that they are propogated. */ + hdr->sh_flags |= (sec->flags & (SHF_MASKOS | SHF_MASKPROC)); + if (strcmp (name, ".liblist") == 0) { hdr->sh_type = SHT_MIPS_LIBLIST; Index: gas/config/tc-mips.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-mips.c,v retrieving revision 1.287 diff -c -3 -p -r1.287 tc-mips.c *** gas/config/tc-mips.c 23 Feb 2005 12:28:04 -0000 1.287 --- gas/config/tc-mips.c 28 Feb 2005 17:01:16 -0000 *************** s_change_section (int ignore ATTRIBUTE_U *** 11385,11398 **** --- 11385,11401 ---- section_type = get_absolute_expression (); else section_type = 0; + if (*input_line_pointer++ == ',') section_flag = get_absolute_expression (); else section_flag = 0; + if (*input_line_pointer++ == ',') section_entry_size = get_absolute_expression (); else section_entry_size = 0; + if (*input_line_pointer++ == ',') section_alignment = get_absolute_expression (); else *************** s_change_section (int ignore ATTRIBUTE_U *** 11424,11429 **** --- 11427,11447 ---- #endif /* OBJ_ELF */ } + #ifdef OBJ_ELF + /* Ensure that any MIPS specific flags in ATTR are passed + on to FLAGS. */ + + int + mips_elf_section_flags (flagword flags, int attr) + { + /* Strictly speaking we ought to only select those bits in the OS and PROC + specific sections of the flags which we know to have defined meanings + for the MIPS. But using the masks is easier and will prevent stange + bugs when new flags are added but this code is not updated. */ + return flags | (attr & (SHF_MASKPROC | SHF_MASKOS)); + } + #endif /* OBJ_ELF */ + void mips_enable_auto_align (void) { Index: gas/config/tc-mips.h =================================================================== RCS file: /cvs/src/src/gas/config/tc-mips.h,v retrieving revision 1.35 diff -c -3 -p -r1.35 tc-mips.h *** gas/config/tc-mips.h 29 Apr 2004 05:14:22 -0000 1.35 --- gas/config/tc-mips.h 28 Feb 2005 17:01:16 -0000 *************** extern unsigned long mips_cprmask[4]; *** 150,155 **** --- 150,158 ---- #define elf_tc_final_processing mips_elf_final_processing extern void mips_elf_final_processing (void); + #define md_elf_section_flags(FLAGS, ATTR, TYPE) \ + mips_elf_section_flags ((FLAGS), (ATTR)) + extern int mips_elf_section_flags (flagword, int); #endif extern void md_mips_end (void); --------------020301030904050004040709--