From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43828 invoked by alias); 26 May 2017 18:10:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 42910 invoked by uid 89); 26 May 2017 18:10:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 May 2017 18:10:11 +0000 Received: by mail-wm0-f68.google.com with SMTP id k15so5279315wmh.3; Fri, 26 May 2017 11:10:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A9CjccHvCrQMea1erLWFEUHwjnft47aOiJFB4GWvAMU=; b=uYHozJiiVDr16jSOblEVz3DYUg6M5XlU4hLuP7lHWEc1IfegWmqOzidbkToO24VZ6Z wILCYgk8yjeOYEdryqQt6l+gLwD+sSA97kvjD1rUcO4owZ8JaBdpYMIlgOb+KQH6G5qx wmyK1qbK0gsgBxqUe0lkwAnxaNXtzp/b/ad1UzGXDCfU7TXRc9h/3OvFEhBf90mGyBsD 4GxoxbucpWEbyvZnYYnq1fsuANbvvx1rutejw/Js7U7iFLqA8383UPrfb1ZNKFWHd2n7 sNHZtshvmwKkbCnGdXIMvI1qFndU4WbgsoKZ94dmeMcYg3mUtEE1jYWeFi1w0ifNQs1i II7g== X-Gm-Message-State: AODbwcBo1ta+2kx51j0oINXfEDe15nuG7Spmb+k3dr5DJHlz4EYP0KCn TlQYpH2HYjlFFWb6dsh+eNBQSJekeA== X-Received: by 10.28.91.80 with SMTP id p77mr2835300wmb.84.1495822212850; Fri, 26 May 2017 11:10:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.159.139 with HTTP; Fri, 26 May 2017 11:10:12 -0700 (PDT) In-Reply-To: <1495487553-19078-3-git-send-email-jcmvbkbc@gmail.com> References: <1495487553-19078-1-git-send-email-jcmvbkbc@gmail.com> <1495487553-19078-3-git-send-email-jcmvbkbc@gmail.com> From: "augustine.sterling@gmail.com" Date: Fri, 26 May 2017 18:10:00 -0000 Message-ID: Subject: Re: [RFC 2/5] xtensa: make configuration dynamic To: Max Filippov Cc: binutils@sourceware.org, gdb-patches@sourceware.org, David Weatherford , Maxim Grigoriev , Woody LaRue Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-05/txt/msg00573.txt.bz2 On Mon, May 22, 2017 at 2:12 PM, Max Filippov wrote: > Now that XCHAL_* macros don't have to be preprocessor constants add > include/xtensa-dynconfig.h that defines them as fields of a structure > returned from the xtensa_get_config function. > Define that structure and fill it with default parameter values > specified in the include/xtensa-config.h. > Define reusable function xtensa_load_config that tries to load > configuration and return an address of an exported object from it. > Define the function xtensa_get_config that uses xtensa_load_config to > get structure xtensa_config, either dynamically configured or the > default. > > 2017-05-22 Max Filippov > bfd/ > * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Append > xtensa-config.c. > * Makefile.in: Regenerate. > * configure: Regenerate. > * configure.ac (xtensa_elf32_be_vec, xtensa_elf32_le_vec): Add > xtensa-config.lo to the tb. > * elf32-xtensa.c (xtensa-config.h): Replace #include with > xtensa-dynconfig.h. > * xtensa-config.c: New file. > > gas/ > * config/tc-xtensa.c (xtensa-config.h): Replace #include with > xtensa-dynconfig.h. > * config/tc-xtensa.h: Likewise. > * config/xtensa-relax.c: Likewise. > > include/ > * xtensa-dynconfig.h: New file. > > ld/ > * Makefile.am (eelf32xtensa.c): Add $(INCDIR)/xtensa-dynconfig.h > to the list of dependencies. > * Makefile.in: Regenerate. > * emultempl/xtensaelf.em (xtensa-config.h): Replace #include > with xtensa-dynconfig.h. This is ok.