From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id E2A8B385843A for ; Mon, 22 Jan 2024 10:58:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E2A8B385843A Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E2A8B385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::230 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705921096; cv=none; b=kjEpXwCMwgHSGzBNx/rfVqaF5lC4m3Fbc9VBSV7jDm4R06e49l/feaxbwmEc9omoKRNqeoxYZTOw53El2XpuT0l/MH5dMTGZTrAenFevQuU+oN85+89cJ//B8yOvQmixo6l+J4zjfBfoWwu64KG1E0vY/7wtXea7fscO2Qf9FgY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705921096; c=relaxed/simple; bh=D+WFuyfHsaJJ5rbnbD0o5R9l0i5KvWZSsNGSeR8MVyo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Ykfmlli6vCzfNzFSoQCInWGVFHwc1DH6InqeanJdH0MqomxC7duf6KuG4rVI+LHXCsjCUyzZ+fgKL1yFfkm289z/gFY+uyn6YxhAQk3BoKkXZ7riUP7bZwoKwzX4o+ur0DQbwYSVUpGFauxpX5mVZHZnjLhzRuW7UbAPg48Ci3E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2cdeb954640so30331131fa.3 for ; Mon, 22 Jan 2024 02:58:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705921092; x=1706525892; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:cc:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SFQyfhjF891sg1ZAJl+lPyen8wJYveKRjlPnG/fGY3M=; b=NwsnP1ff1MqwUAe5/GFufJKz7cfsiAnIm1ZOd/a2F1ELMDoPV2bZ6u6n6c0SNUy2j4 nr8TvwmlCG1n9zek3NFTTeTt940s6Xf0AkrUZIB+6Gn46xNGr0SB8BqpqmkCfa6M3wci vaFbPn0K1EV3VyTuSBe+EGqcBhFN34P+2IxFHSsYdh/ywX7QQ5Gy/mxLGZ9IxtsKq0QJ 53SRTw1/jKKjEIDxAnGOx+0PUXXmLex2q+/xQo4wSfakQCv6OAUzdQWYYON1abmntefb PiiXieVfcSo6HSEsW5f2UVOrsjbKKK5manX4wbjlgpGrRnDm1VIY5gU8EDEx6Q4qvBQY 0eDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705921092; x=1706525892; h=content-transfer-encoding:in-reply-to:autocrypt:from:cc:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SFQyfhjF891sg1ZAJl+lPyen8wJYveKRjlPnG/fGY3M=; b=MXrsHcCMdm69n/ldMVwm3XTcaifAaytJ0aA9XEs/+v8vEFq3kJQlNEMGYCoS8ZPZHA 05KOA4VRkcFE9Aoh/DyXoGeRb2wjqmWK/Ct9QDBktsnfR2aKGq8kjabkGkDlO+qXbrCb JJvtht3oNEc1bzHEx+rsFsu7TpXzV3kOj1YrNxOTPX+8Fm2pi34yYhx2kq5wbSKGfnE0 pwiZOyQmCZa9MTOdkibEc7TX9lWrIMT5llXaQ/rC/gEDyPb+raOU3N+LcvIFCuI9ztPg eFg6CLypkC7VzstkqN2cEHPZCD96LyE3P7C5E1adl2zuPtW10ntbhb4Z++D9iG/Evdz+ 2hZQ== X-Gm-Message-State: AOJu0YyAgDCSUCbFiJfFuosGrObo7LUWVPpCza6P1lkueR6doE95YG98 2S6gOQ2P4z+KSeQP2MuG8bEbLlHeHNZxBajHsaMBw8pC6PhlV2tBtzpU7M3/6RvuocHJV5KLivI = X-Google-Smtp-Source: AGHT+IG2gpkR0/uVfWk+2m5MvVOFWBCW/G9r7b+xgMQW4cofnBJI+p4owBUhl8EKlZhPbx1CK1xW/A== X-Received: by 2002:a2e:9649:0:b0:2cd:10be:cf13 with SMTP id z9-20020a2e9649000000b002cd10becf13mr1400278ljh.2.1705921092290; Mon, 22 Jan 2024 02:58:12 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id bp15-20020a056e02348f00b00362768a8dccsm1108955ilb.30.2024.01.22.02.58.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jan 2024 02:58:11 -0800 (PST) Message-ID: Date: Mon, 22 Jan 2024 11:58:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: readelf --string-dump analog for objdump Content-Language: en-US To: Maxim Dementyev References: Cc: binutils@sourceware.org From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+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nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3025.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 22.01.2024 11:43, Maxim Dementyev wrote: > The readelf utility has a very useful option - "--string-dump= name>" which displays the contents of the indicated section as is (as > printable strings). > As far as I can understand, to do the same with the objdump you need to do > "objdump --section= --full-contents ...". > But the output is in the "hexdump" format, the contents is splitted by 0x10 > size blocks (so, not possible to grep on this contents). > > Is there any plans to implement a printable strings format for this case > for the objdump utility? > Or is there a solution without parsing the hexdump format and restoring > these printable strings? >From what you write I can only guess that you'd like to use the functionality on non-ELF objects which binutils as whole (and maybe objdump in particular) supports. If so, is there a reason you can't extract the section(s) in question using "objcopy --only-section" (e.g. as a raw binary file), and then use "strings" on the result? Jan