From patchwork Mon Jun 21 21:16:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Espindola X-Patchwork-Id: 56348 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 24608B6F10 for ; Tue, 22 Jun 2010 07:17:09 +1000 (EST) Received: (qmail 26639 invoked by alias); 21 Jun 2010 21:17:05 -0000 Received: (qmail 26628 invoked by uid 22791); 21 Jun 2010 21:17:04 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Jun 2010 21:16:59 +0000 Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id o5LLGvWo016322 for ; Mon, 21 Jun 2010 14:16:57 -0700 Received: from iwn9 (iwn9.prod.google.com [10.241.68.73]) by kpbe12.cbf.corp.google.com with ESMTP id o5LLGX0N028500 for ; Mon, 21 Jun 2010 14:16:56 -0700 Received: by iwn9 with SMTP id 9so1118483iwn.17 for ; Mon, 21 Jun 2010 14:16:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.168.129 with SMTP id u1mr6568053iby.49.1277155016132; Mon, 21 Jun 2010 14:16:56 -0700 (PDT) Received: by 10.231.140.16 with HTTP; Mon, 21 Jun 2010 14:16:55 -0700 (PDT) Date: Mon, 21 Jun 2010 17:16:55 -0400 Message-ID: Subject: [gold] Add a plugin callback for setting the extra search path From: Rafael Espindola To: GCC Patches X-System-Of-Record: true 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 I committed the attached patch. It was reviewed by Cary in the binutils list. 2010-06-21 Rafael Espindola * plugin-api.h (ld_plugin_set_extra_library_path): New. (ld_plugin_tag): Add LDPT_SET_EXTRA_LIBRARY_PATH. (ld_plugin_tv): Add tv_set_extra_library_path. Cheers, diff --git a/include/ChangeLog b/include/ChangeLog index cf5a944..a9fb359 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,9 @@ +2010-06-21 Rafael Espindola + + * plugin-api.h (ld_plugin_set_extra_library_path): New. + (ld_plugin_tag): Add LDPT_SET_EXTRA_LIBRARY_PATH. + (ld_plugin_tv): Add tv_set_extra_library_path. + 2010-06-21 Jakub Jelinek * dwarf2.h (enum dwarf_type): Add DW_ATE_UTF. diff --git a/include/plugin-api.h b/include/plugin-api.h index 55cfe25..a0cf5f4 100644 --- a/include/plugin-api.h +++ b/include/plugin-api.h @@ -228,6 +228,12 @@ typedef enum ld_plugin_status (*ld_plugin_add_input_library) (const char *libname); +/* The linker's interface for adding a library path that should be searched. */ + +typedef +enum ld_plugin_status +(*ld_plugin_set_extra_library_path) (const char *path); + /* The linker's interface for issuing a warning or error message. */ typedef @@ -261,7 +267,8 @@ enum ld_plugin_tag LDPT_GET_INPUT_FILE, LDPT_RELEASE_INPUT_FILE, LDPT_ADD_INPUT_LIBRARY, - LDPT_OUTPUT_NAME + LDPT_OUTPUT_NAME, + LDPT_SET_EXTRA_LIBRARY_PATH }; /* The plugin transfer vector. */ @@ -283,6 +290,7 @@ struct ld_plugin_tv ld_plugin_get_input_file tv_get_input_file; ld_plugin_release_input_file tv_release_input_file; ld_plugin_add_input_library tv_add_input_library; + ld_plugin_set_extra_library_path tv_set_extra_library_path; } tv_u; };