From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0E7E0A0350; Thu, 2 Jul 2020 02:07:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E600F1D595; Thu, 2 Jul 2020 02:07:46 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 893C01D543 for ; Thu, 2 Jul 2020 02:07:45 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id s1so29380461ljo.0 for ; Wed, 01 Jul 2020 17:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bzW9EgjPs+NoUD7xipsmiig0XEy0dgYebg/ik1qgaHY=; b=eDFxaBTHFqyfjQuEiOza8WPxWoH+WEcn8/eLPzdDoAm4mU6xBVoM71ZB4puVTP/G2N xoqfC1lWFpf10cvU87/pTONBK+CQGftY77yI1rDWRVzBQqJcgBBbJFVaWD/qB7EVk4tA RAtFjxqv1/A65Rx2kiizNCzoRT+M0SSRqahIko8BbjeK+7dAAC7I9rJW4tKbnBbgisrg +4/SqtUzCCxRfyw1Ok+ptwyMC3EJlecBf4Ksl7LNYzYynfOhMaG+SvyiWV/itJXnhQ1j 82Tv09ymYQIqzZWdRsrsgn7WAJjgN7CFBhQuLY2f3oycxc8/5/DHIshNHVsysonl1cVS O+lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bzW9EgjPs+NoUD7xipsmiig0XEy0dgYebg/ik1qgaHY=; b=uKylYgukYzqLyBXX0lq3TeFu3T2gAjYuXLXF3/BjpGhCviOzpYKImLinvSyixWWZOV 4OyoLhYffo4QKT6Twh2UgeFpZBxamTQnvDS8WsCjuzbrVQ6PsDWI4XNQ3aBzrhL81iKj 2bljfVEyP2pozEkdusi5J1WXPLsWaRsqs+ckae9vQ6IdugWViVSOELcCVkDtuoC+VbYN HuS2fm8+TiS02DqbVV7a2DTN9UZQ4Bpb+QqoGtnY+iyEyoyg1xlMr/NnNVdynKT1eiim OT/mXwL157gTLW//280RG8xoztI9ps1H5Rq5VqSXbKOav/xU3wUQVAzCYVBIp5GFCQ1j WFLA== X-Gm-Message-State: AOAM531Ao6cJDqMawgTnolq03PeUWERGZP2IjA1EAH4X/J1xOZ7gyZvU SqxkPjwgTzUrjSzvsjcx/qQ= X-Google-Smtp-Source: ABdhPJy2pWDs+qz+g1iPCZ4KhhLCXW+9MFGng+g1w7FT/6XSZPq7aMLTG6AHBH3EPVCKDDwgRjEVjw== X-Received: by 2002:a2e:b607:: with SMTP id r7mr8282484ljn.5.1593648465157; Wed, 01 Jul 2020 17:07:45 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id x11sm2623518lfq.23.2020.07.01.17.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 17:07:44 -0700 (PDT) Date: Thu, 2 Jul 2020 03:07:43 +0300 From: Dmitry Kozlyuk To: Neil Horman Cc: dev@dpdk.org, Bruce Richardson , Thomas Monjalon , robin.jarry@6wind.com Message-ID: <20200702030743.44349af4@sovereign> In-Reply-To: <20200623112806.GA301645@hmswarspite.think-freely.org> References: <20200622004503.29036-1-dmitry.kozliuk@gmail.com> <20200622124117.GA216823@hmswarspite.think-freely.org> <20200622223946.25977c13@sovereign> <20200623112806.GA301645@hmswarspite.think-freely.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH 0/2] pmdinfogen: rewrite in Python X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 23 Jun 2020 07:28:06 -0400 Neil Horman wrote: > On Mon, Jun 22, 2020 at 10:39:46PM +0300, Dmitry Kozlyuk wrote: > > On Mon, 22 Jun 2020 08:41:17 -0400, Neil Horman wrote: > > > On Mon, Jun 22, 2020 at 03:45:01AM +0300, Dmitry Kozlyuk wrote: [snip] > > I was talking about these fields of struct elf_info: > > > > /* if Nth symbol table entry has .st_shndx = SHN_XINDEX, > > * take shndx from symtab_shndx_start[N] instead > > */ > > Elf32_Word *symtab_shndx_start; > > Elf32_Word *symtab_shndx_stop; > > > > They are not used after being filled in parse_elf() and their endianness > > fixed in the end despite the comment. > > > Its been a while since I wrote this, so I need to go back and look closely, but > as you say, these values aren't used after parse_elf completes, but they are(I > think) used to correct the endianess of the section header index table, so that > get_sym_value works properly. You would (again I think), only note a problem if > you were parsing an ELF file for an architecture with an endianess opposite that > of what you are building on (i.e. an x86 system cross compiling for a powerpc > target). Thanks for the explanation. Anyway, it's yet another point to prefer pyelftools to parsing ELF manually. [snip] > > Native builds can use Python or PowerShell, which is as capable as Unix > > shells, but incompatible with them. To call lib.exe (MSVC analog of ar) is > > probably simpler then parsing COFF, yes. So meson could select one of the > > following for a Windows target (objects are COFF): > > > > Host Toolchain Archive Script Extractor > > ------- --------- ------- --------- --------- > > Linux MinGW .a sh ar > > Windows MinGW .a PowerShell ar > > Windows Clang .lib PowerShell lib > I think if I read you right, what you're suggesting here is that meson setup a > build time marco $ARCHIVETOOL, and set it to ar or lib.exe depending on the > build environment, and just have the script in question use $ARCHIVER? If so, > I'd be good with that. Do we have to worry about the use of divergent command > line options for each tool as well? As I said, PowerShell cannot consume the same shell script. My suggestion was to have two scripts, one existing for shell and ar (used by Linux host), and one new PowerShell script for both lib.exe and ar (used by Windows host). Meson then would select which script to call. Another option is to have one wrapper Python script for all hosts: a few extra lines to launch archiver, but less files and no need to know shell/PowerShell when changing this part. (I believe Bruce means the same.) But it will still be a separate script. -- Dmitry Kozlyuk