From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21803 invoked by alias); 6 Jun 2011 22:02:32 -0000 Received: (qmail 21788 invoked by uid 22791); 6 Jun 2011 22:02:29 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS,TW_FX,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 22:02:15 +0000 Received: (qmail 15049 invoked from network); 6 Jun 2011 22:02:13 -0000 Received: from unknown (HELO ?10.0.2.15?) (clm@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Jun 2011 22:02:13 -0000 Message-ID: <4DED4E64.6080507@codesourcery.com> Date: Mon, 06 Jun 2011 22:02:00 -0000 From: Catherine Moore User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 CC: binutils@sourceware.org, Catherine Moore Subject: PING Re: [RFA] Linker script extension SECTION_FLAGS References: <4DD41EB0.6040300@codesourcery.com> <4DDC37D2.3030700@codesourcery.com> In-Reply-To: <4DDC37D2.3030700@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2011-06/txt/msg00062.txt.bz2 Hi, Do any of the maintainers have time to review this patch? Thanks, Catherine On 05/24/2011 06:57 PM, Catherine Moore wrote: > On 05/18/2011 08:07 PM, Ian Lance Taylor wrote: >> Catherine Moore writes: >>> >>> Does this look okay to install? >> >> I didn't look at the patch, but I think the documentation needs to use >> some real section flags, and ideally the set of valid flags should be >> defined somewhere. It's not obvious what the valid values are. >> >> I'm also not sure about the way it appears in a linker script. You have >> SECTION_FLAGS, which describes a constraint on the input sections >> attached to an output section, next to things like AT, ALIGN, and >> SUBALIGN, which describe characteristics of the output section. That is >> OK, but I think that somebody looking at a linker script is likely to >> think that SECTION_FLAGS is setting flags for the output section, much >> as ALIGN sets the alignment of the output section. But that's not what >> happens at all. So perhaps the name should be something like >> INPUT_SECTION_FLAGS or perhaps the constraint should be expressed >> somehow inside the output section definition, in the list of input >> sections, rather than outside. >> > > A new patch that addresses these concerns plus a couple that were > pointed out by Tristan is attached here. Tristan, I didn't incorporate > your comment regarding the backend hook into the new patch. I have now > filled in bfd_elf_lookup_section_flags to handle all of the ELF common > section header flags. The backend hook is intended to handle the > target-specific flags. Although, I'm not submitting it at this time, the > backend hook that I am using for the PowerPC VLE target is attached as > an example. > > Please let me know if there are additional concerns or comments and > whether this is okay to commit. > > I've tested ppc-elf, mips-elf and arm-coff targets. > > Thanks, > Catherine > > bfd/ > 2011-05-24 Catherine Moore > > * bfd-in2.h: Regenerated. > * bfd.c (bfd_lookup_section_flags): New definition. > * binary.c (binary_bfd_lookup_section_flags): New definition. > * coff-rs6000.c (rs6000coff_vec): Include > bfd_generic_lookup_section_flags. > (pmac_xcoff_vec): Likewise. > * coffcode.h (coff_bfd_lookup_section_flags): New definition. > * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare. > (bfd_elf_lookup_section_flags): Declare. > * elflink.c (bfd_elf_lookup_section_flags): New function. > * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define. > (elf_backend_lookup_section_flags_hook): Define. > (elf_backend_data): Add elf_backend_lookup_section_flags_hook. > * ieee.c (ieee_bfd_lookup_section_flags): New define. > * ihex.c (ihex_bfd_lookup_section_flags): New define. > * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare. > (bfd_generic_lookup_section_flags): Declare. > * libbfd.h: Regenerated. > * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New. > * mmo.c (mmo_bfd_lookup_section_flags): New definition. > * oasys.c (oasys_bfd_lookup_section_flags): New definition. > * pef.c (bfd_pef_bfd_lookup_section_flags): New definition. > * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition. > * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition. > * reloc.c (bfd_generic_lookup_section_flags): New function. > * som.c (som_bfd_lookup_section_flags): New definition. > * srec.c (srec_bfd_lookup_section_flags): New definition. > * targets.c (flag_info): Declare. > (NAME##_bfd_lookup_section_flags): Add to LINK jump table. > (_bfd_lookup_section_flags): New. > * tekhex.c (tekhex_bfd_lookup_section_flags): New definition. > * versados.c (versados_bfd_lookup_section_flags): New definition. > * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition. > * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition. > > > include/ > 2011-05-24 Catherine Moore > > * bfdlink.h (flag_type): New enumeration. > (flag_info_list): New structure. > (flag_info): New structure. > > ld/testsuite/ > 2011-05-24 Catherine Moore > > * ld-scripts/section-flags-1.exp: New. > * ld-scripts/section-flags-1.s: New. > * ld-scripts/section-flags-1.t: New. > > > ld/2011-05-23 Catherine Moore > > * ld.texinfo: Document usage of INPUT_SECTION_FLAGS. > * ldgram.y (section): Recognize sect_flags. > (sect_flags): New rule. > (sect_flag_list): New rule. > * ldlang.c (lang_add_section): Check section flags. > (lang_enter_output_section_statement): Add argument sflags. > Initialize sflags field in output statement. > * ldlang.h (lang_output_section_statement_type): Add flag_info field. > (lang_enter_output_section_statement): New argument sflags. Update > all callers. > * ldlex.l (INPUT_SECTION_FLAGS): New token. > * mri.c (mri_draw_tree): Update argument list for > land_enter_output_section_statement. > > > >