From patchwork Wed Mar 4 22:18:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11420899 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF6FC14B7 for ; Wed, 4 Mar 2020 22:21:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83EC220848 for ; Wed, 4 Mar 2020 22:21:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aq0Po0Pi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83EC220848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9cO6-0005Ld-LR for patchwork-qemu-devel@patchwork.kernel.org; Wed, 04 Mar 2020 17:21:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33202) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9cLl-0000kb-FN for qemu-devel@nongnu.org; Wed, 04 Mar 2020 17:18:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9cLk-00071D-AN for qemu-devel@nongnu.org; Wed, 04 Mar 2020 17:18:45 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:45723 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9cLk-00070T-6V for qemu-devel@nongnu.org; Wed, 04 Mar 2020 17:18:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583360323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mevovTh2z//uQB1rbtMSkrPY9g+6HbLB05a8lK8425E=; b=aq0Po0Pi2Q9TbLqSXjLH2AQDBqZ0LW9YX9oyRbIeW4mpkpSE9P7OMhxjo0An3V+QvLO1r/ OyBuwOvOjEWJ3/hJodjEMyEbGdPk3e5qZQWRCORCAJwQWa5E4GlL1oqaFF3hNGnWwO071S lCovBW94Z1XxoQkYmK0xBokNnzaZj94= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-384-8MwfRC07OEOm2xuBhPdBHA-1; Wed, 04 Mar 2020 17:18:42 -0500 X-MC-Unique: 8MwfRC07OEOm2xuBhPdBHA-1 Received: by mail-wr1-f72.google.com with SMTP id n12so1429410wrp.19 for ; Wed, 04 Mar 2020 14:18:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8itZXg/N7J74J4OimKI2kWdVe8JS+hsrlg+d+Edd6OU=; b=bRf5ju1VupSz11sTvl1MlHbTFzGY44KxI8OUXZD5Lmi/o0FflXZLEJH+Ua7lWfN3pM IiuLfC91jxhbvXp3Ln+rFu94mdBE9F14NBKFtOmUAIB8nsSvQ3sOW+ntO+yf1G0JJfmD MXAVqgqRvigbq6yzM98jAlq0V2KJRjIX8EVn5fYuG3ZB6CQcifxvXAV9RKpZW+lLpY2Y Ley5sg8EKHzNJjKDD5dzetAP63wLRACZzcOGRqyuKucuZZ2hYYXJBtKSv2WUg/xWSTZB +xRSv/0LglovmhiLYbe7zDgiIfmRGbHp+aRS+mHjxAvNi4jAPLz6pv9KOapOZ7bIE0aq FPbQ== X-Gm-Message-State: ANhLgQ2ErUiSgOIeOtMt9p5H24eLyIxFgMwPZcIPPEBzduvOWO/VJJJR Fvrypg4ZeT1zBmxcV0m+3TjAoFuk9Ed0EaYperBXjEbcsrIuRdESkN2nfHwE1AV4jrzQhKLLids DbbIF9nJ0Bjccqbs= X-Received: by 2002:a1c:750e:: with SMTP id o14mr5387712wmc.156.1583360289775; Wed, 04 Mar 2020 14:18:09 -0800 (PST) X-Google-Smtp-Source: ADFU+vtP5/X7qMtItTdqvRAmfbBql51yio/qOOkkyd+VUuklGjXJhnZrxG3K/ROiIpzyuILKkg/otQ== X-Received: by 2002:a1c:750e:: with SMTP id o14mr5387697wmc.156.1583360289469; Wed, 04 Mar 2020 14:18:09 -0800 (PST) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id z12sm4506428wrl.48.2020.03.04.14.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 14:18:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 0/6] hw,ui: Reduce QEMU .rodata/.bss footprint Date: Wed, 4 Mar 2020 23:18:01 +0100 Message-Id: <20200304221807.25212-1-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This series reduce the footprint of the QEMU binary: .bss: 106KiB (moved to .heap) .rodata: 4.34MiB (sizes on x86_64 building with -Os) The elf-dissector tool [1] [2] helped to notice the big array. [1] https://phabricator.kde.org/source/elf-dissector/ [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html Philippe Mathieu-Daudé (6): hw/audio/fmopl: Fix a typo twice hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss hw/usb/quirks: Use smaller types to reduce .rodata by 10KiB hw/audio/intel-hda: Use memory region alias to reduce .rodata by 4.34MB ui/curses: Make control_characters[] array const ui/curses: Move arrays to .heap to save 74KiB of .bss hw/usb/quirks.h | 10 +++++----- hw/audio/fmopl.c | 8 +++++--- hw/audio/intel-hda.c | 24 ++++++++++-------------- ui/curses.c | 10 +++++++--- 4 files changed, 27 insertions(+), 25 deletions(-)