From patchwork Fri Aug 24 19:07:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriraman Tallam X-Patchwork-Id: 179882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 150752C0341 for ; Sat, 25 Aug 2012 05:07:57 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346440078; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=aEoDzT4 5US/n+K8J9Uq2GIkF6lo=; b=AwhaBAHSHGSqGgkXuoAMUDRSU3i12G6Ey5l/N3w 98GM7FQxLL4ORHbuCnjNSwIYbzH/7wdqur6Su78NNftzAlbC5FxyT/U+7PHHZyZs zcws+8FHMyWHyuBEQHlSD3Yhl1C2Sf9UT5ETkgUx6LPRZDAViyb4Lx6mMBDdUO7s CPdI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-System-Of-Record:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=wA1D7ouv3qyEjhRbriFI8h8IynsI212jXAnR+g5IXWzj0nxmdeB41ZT3sFj7cR SpdTsVBMCAcAwUtDArSgrpe+Mu3z0LyIYuVQ7cqajxn7UruLY2d6WT++3FBRmVgO pzvfj2veJugmkQCoZ1O7hgeTQF4TNnVnnO7z6/8klwaLA=; Received: (qmail 28655 invoked by alias); 24 Aug 2012 19:07:54 -0000 Received: (qmail 28645 invoked by uid 22791); 24 Aug 2012 19:07:53 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Aug 2012 19:07:40 +0000 Received: by obc16 with SMTP id 16so5509569obc.20 for ; Fri, 24 Aug 2012 12:07:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record:x-gm-message-state; bh=esTmILYhq15Ws3ZiV0nP4XqE4Fb8516EZQdIm7VeW94=; b=mhI4nhAH/T3v8PWPMJiRWNmyAXzoB6de1VQKXx5gB7LilBW4JlC9+SuGOJuAHDH7v4 fasL5IcF62SD5EwFn1DUpGkoY5zyLVAuwoeAGlS8lV2qGf6jlxw2L7DfPMS4wtoP4Ri7 x0LmIvTZqbHJ4lGp0qSOHIQxMBRCBnngIooWbO6AkLeDNLMlrQqALJDjkQR8/QeeYsBW 3XWI1vV8aN2/yIwldgSP4k6PvDheJfuo7MNdPU3R2LE40Sfieq/LmG8n61AzyOkJa/aq AwKuJcrsNYjdIT5GhR7WUZpn2ln1VZPwWQp0X5c0YWTQ1tYfs1ESyaEyzfQSu+RUzXpz 1wjA== Received: by 10.182.222.39 with SMTP id qj7mr4769739obc.16.1345835260288; Fri, 24 Aug 2012 12:07:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.222.39 with SMTP id qj7mr4769733obc.16.1345835260199; Fri, 24 Aug 2012 12:07:40 -0700 (PDT) Received: by 10.182.58.193 with HTTP; Fri, 24 Aug 2012 12:07:40 -0700 (PDT) Date: Fri, 24 Aug 2012 12:07:40 -0700 Message-ID: Subject: Sync include/plugin-api.h with src/ From: Sriraman Tallam To: GCC Patches , Ian Lance Taylor X-System-Of-Record: true X-Gm-Message-State: ALoCoQne0g2tZ1quOWoEwrtpZlQ6HAXDhESklCuI6Z8zEzM4kaqnEdLUmsdsmvd1LsYPs+ir/rt3BYLCEGZhrcRiE26sJeJxoljF6hGWIHr2VYH1+fpAXNDO8iJ8Og92ICNRiUQLlRFJb6coaaQ+zMEvn9Q6Zk9DR/tpGS78YuACgpK+o+qxVjmXsfn1o0gGWFgPQPUkNiPB X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, This patch was approved by Ian: http://sourceware.org/ml/binutils/2012-08/msg00447.html I have synced plugin-api.h with the following patch: * plugin-api.h (ld_plugin_allow_unique_segment_for_sections): New interface. (ld_plugin_unique_segment_for_sections): New interface. (LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. (LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val. (tv_allow_unique_segment_for_sections): New member. (tv_unique_segment_for_sections): New member. Thanks, -Sri. Index: plugin-api.h =================================================================== --- plugin-api.h (revision 190650) +++ plugin-api.h (working copy) @@ -318,6 +318,33 @@ typedef enum ld_plugin_status (*ld_plugin_allow_section_ordering) (void); +/* The linker's interface for specifying that a subset of sections is + to be mapped to a unique segment. If the plugin wants to call + unique_segment_for_sections, it must call this function from a + claim_file_handler or when it is first loaded. */ + +typedef +enum ld_plugin_status +(*ld_plugin_allow_unique_segment_for_sections) (void); + +/* The linker's interface for specifying that a specific set of sections + must be mapped to a unique segment. ELF segments do not have names + and the NAME is used as the name of the newly created output section + that is then placed in the unique PT_LOAD segment. FLAGS is used to + specify if any additional segment flags need to be set. For instance, + a specific segment flag can be set to identify this segment. Unsetting + segment flags that would be set by default is not possible. The + parameter SEGMENT_ALIGNMENT when non-zero will override the default. */ + +typedef +enum ld_plugin_status +(*ld_plugin_unique_segment_for_sections) ( + const char* segment_name, + uint64_t segment_flags, + uint64_t segment_alignment, + const struct ld_plugin_section * section_list, + unsigned int num_sections); + enum ld_plugin_level { LDPL_INFO, @@ -355,7 +382,9 @@ enum ld_plugin_tag LDPT_GET_INPUT_SECTION_CONTENTS, LDPT_UPDATE_SECTION_ORDER, LDPT_ALLOW_SECTION_ORDERING, - LDPT_GET_SYMBOLS_V2 + LDPT_GET_SYMBOLS_V2, + LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS, + LDPT_UNIQUE_SEGMENT_FOR_SECTIONS }; /* The plugin transfer vector. */ @@ -385,6 +414,8 @@ struct ld_plugin_tv ld_plugin_get_input_section_contents tv_get_input_section_contents; ld_plugin_update_section_order tv_update_section_order; ld_plugin_allow_section_ordering tv_allow_section_ordering; + ld_plugin_allow_unique_segment_for_sections tv_allow_unique_segment_for_sections; + ld_plugin_unique_segment_for_sections tv_unique_segment_for_sections; } tv_u; };