From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2094.outbound.protection.outlook.com [40.92.20.94]) by sourceware.org (Postfix) with ESMTPS id 07C8F39878B0 for ; Thu, 17 Sep 2020 16:04:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 07C8F39878B0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=i@maskray.me ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BRGXnKNJA8hm050SXfeK8xyCu3P/PeaeuLovAopVw8BKITxm91raBbTryVdwUK1OFX6zkBM5ePVpp54v4ZaJO1BxJS4NA4H0o11nxHf3d55us3BEgIxGFGxvt0sw2VjhTLPRu+NvhLW2Pb/yqD26bJTx1zc/Vgc+MVzfFt1e10iF3Co1dh4ho3mcqF4nBvx1s2RVqyLDOocaei/WYMDXu4ecb3fFVAZW1ThFuhczI1GABFBHOKDZtbUTglUX9trx8lKVsSliL4/IKAh22YASgf2hLek7a3ITBLVLdXI3fF6LFjRbhcWQ2sy+OQcBi7egmdirqZUg6i4DIXcRrvjRyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G7p0BGrdBA3Jql/CTQWLuz3Vtqr0qXUJH+VWhh/ZHNI=; b=aTP29tVRBcuLWEESPW1OSabUiwAD02qiPBSt6S2v6vdhlwXSip95P/EpRkq7I8yEdfI3cErV7rP6V0WZo7BETG4aJurvj23Anl8EyaUyl79N5XQFIQ/bAqTFw1WbkkEof5fP8PGV47PDz9VtQ84H1kiJFzFvZLFhc6FIgP26r5IonDgthuivf0RX9DajS/i3PmCBh64ob5FGVCiXwZoUE6qG3xs0VH+2YFsydRcqlCU5GxJ1KtD/MFErjdPhtIU5Gyad+vdoFFPxGQkakdmPsXyA69sU8dX6nNC91CpX7MPeHPxJqQ+2FmoqJIxSalgdd0mvD1i00VajPhrQ7cUPmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::53) by CO1NAM11HT194.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::239) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Thu, 17 Sep 2020 16:04:23 +0000 Received: from MWHPR12MB1456.namprd12.prod.outlook.com (2a01:111:e400:3861::42) by CO1NAM11FT042.mail.protection.outlook.com (2a01:111:e400:3861::250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Thu, 17 Sep 2020 16:04:23 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:B35FFDD418724BFC7DCE5B5A7AA4AB2DA4713DFA3DD927FB5EA777D6CC28C4BD; UpperCasedChecksum:73D8399EC6CDC5DF1CAD175B3B7DDAFEA05D76054A0AA248F23B5CEE40AD1E09; SizeAsReceived:9862; Count:56 Received: from MWHPR12MB1456.namprd12.prod.outlook.com ([fe80::351d:ec3d:d666:bb70]) by MWHPR12MB1456.namprd12.prod.outlook.com ([fe80::351d:ec3d:d666:bb70%12]) with mapi id 15.20.3370.019; Thu, 17 Sep 2020 16:04:23 +0000 X-Gm-Message-State: AOAM532xMdjb6XDPwBJKPZMage5ZiGVT0fcx5zWx9d4Vyk7RHcvAilbL hDbuFr0Dxa3amGZcvFPvX5pUTX1oGE7gDsDxKpo= X-Google-Smtp-Source: ABdhPJxp2nj1DzyTnQYE0r9ZPe8S+baQJY+x6BV2VBObmFla6Sk2V12WuPq22PkJjBZVfVI8zsIR7Uk/f17yrplnNRc= X-Received: by 2002:ac8:5d04:: with SMTP id f4mr16303131qtx.290.1600358361318; Thu, 17 Sep 2020 08:59:21 -0700 (PDT) References: <0c4f8085-3403-4984-e370-f8624c048438@redhat.com> In-Reply-To: From: Fangrui Song Date: Thu, 17 Sep 2020 08:59:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Readelf: --wide as default if output is redirected To: Katharina Bogad Cc: Nick Clifton , "binutils@sourceware.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MN2PR01CA0050.prod.exchangelabs.com (2603:10b6:208:23f::19) To MWHPR12MB1456.namprd12.prod.outlook.com (2603:10b6:301:f::9) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mail-qt1-f171.google.com (209.85.160.171) by MN2PR01CA0050.prod.exchangelabs.com (2603:10b6:208:23f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.13 via Frontend Transport; Thu, 17 Sep 2020 16:04:22 +0000 Received: by mail-qt1-f171.google.com with SMTP id e7so2237201qtj.11 for ; Thu, 17 Sep 2020 09:04:22 -0700 (PDT) X-Gm-Message-State: AOAM532xMdjb6XDPwBJKPZMage5ZiGVT0fcx5zWx9d4Vyk7RHcvAilbL hDbuFr0Dxa3amGZcvFPvX5pUTX1oGE7gDsDxKpo= X-Google-Smtp-Source: ABdhPJxp2nj1DzyTnQYE0r9ZPe8S+baQJY+x6BV2VBObmFla6Sk2V12WuPq22PkJjBZVfVI8zsIR7Uk/f17yrplnNRc= X-Received: by 2002:ac8:5d04:: with SMTP id f4mr16303131qtx.290.1600358361318; Thu, 17 Sep 2020 08:59:21 -0700 (PDT) X-Gmail-Original-Message-ID: X-Microsoft-Original-Message-ID: X-TMN: [oOFf1fzSBDhh2Oia7JF58hD4ymcoVEqc] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 56 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: bc2088b5-a328-48ee-ea84-08d85b2357c7 X-MS-TrafficTypeDiagnostic: CO1NAM11HT194: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZUC8soc6dXZErLnVexnBPH8nydpz3Q4m6RD9uN36Q2cUKJK3X9WgCghIq2e80A7WfNXlUPk/8/dYH6KluEJMXD1Sh1KNWhN6DMQY6NY0ywvgnuGd6aqiaJk3czuemHJhqH3U8FEQJEvI3qDQaAVF7yPXk4XTizY4bSPSo2OnDY7N7npdU78k84g/sJ3Rhaqt4YdymbfmQWYyGUShfZqk9Q== X-MS-Exchange-AntiSpam-MessageData: HZYD2hHbdbf9/CTeb4NE6qhhaGDeRlB/Et786p2PEUeQ2UgC1rz4aTtRGYyf3jwM/zB6g9CabP9f5YEzny57lEe3dIWeKajU/QWF1aWqaRn4r5cy3Pr2exkIksiOBY0qQ0LZFkjZASgH2zEuz/+OJg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc2088b5-a328-48ee-ea84-08d85b2357c7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2020 16:04:23.2565 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT194 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 16:04:25 -0000 On Thu, Sep 17, 2020 at 3:36 AM Katharina Bogad via Binutils wrote: > > Hi Nick, > > > Which version of readelf ? > > 2.31 and 2.24. I am kind of stuck with the latter one because it belongs = to > an embedded systems development SDK I have no control over. > > > I added a new feature to the 2.35 release so that by default readelf wi= ll > > suffix truncated symbol names with "[...]", thus letting the reader kno= w > > that the name has been abbreviated. > > Yeah, that at least makes it obvious. Thank you! > > > Yeah, I think that changing the default behaviour like this would be a = bad > > idea. But of course you can always create a wrapper script that adds t= he --wide > > option (and maybe invokes the pager at the same time). > > Well, my argument would be that redirection is good for basically three > things: > - archival > - automated processing > - reading in a pager > > Truncating the output IMO does not add value in any of these cases; with > the obvious exception being pagers that can=E2=80=99t be configured to no= t wrap lines. > In fact, I=E2=80=99d make the argument that it is counter-productive for = archival and > automated processing (you=E2=80=99d have to pass --wide anyways to get ac= curate > results, and it was definitely a gotcha for me, making the behaviour non- > obvious). Maybe I am missing something, but I can=E2=80=99t think of a us= e-case > where truncating would add value besides viewing in a width-restricted > terminal. > > But really, I=E2=80=99m fine either way. Future me will thank you for the= dots once I > forget that --wide is a thing and binutils >=3D2.35 has hit my toolchains= . > > Best, > Katharina Yeah, I created an alias 're' for 'readelf -W'. Sometimes I need to provide a command for others and omitting -W has always caused me trouble. To provide a data point, llvm-readelf supports only the wide format and ignores --wide. It turns out that most projects don't need a change.