From patchwork Tue Sep 10 19:34:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 173548 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp6236543ilq; Tue, 10 Sep 2019 12:34:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2qBHJ8qyhxXbQvKvT1boBNlcJjPacn0x195v7XWadsq6LkRZqAgKR43iASIb12XXVCwkl X-Received: by 2002:ae9:de84:: with SMTP id s126mr13768606qkf.245.1568144084409; Tue, 10 Sep 2019 12:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568144084; cv=none; d=google.com; s=arc-20160816; b=dryCjXEgpcrOdcg2t05/PAqi4v8fiP9/ikcwAzKUOB8wScwITAwa+O6IDmybsv0Npm p8PrfPPWzknIAYYd0uh5zBy93KE8HnAGf7TpM2jLXAlUGXiJNU2D/Rv8wU6IcTatQrfZ hNknO4vddxAR549RwUzsF7NoxrPlsw96g3cGfTbS7EwrAw/B5PUL/r2s8DDwGhPvC9Z/ b7pvr4fbWQERfLmQ+QSQ3g+YJY7HWTWnZWup7YROMRRtpaosYjnMHvD013fy1sGGHgy6 i6E10kE9W0ORfZ6+qYKBUXZrXt/kK7nSukF9H3VJ/+cLx6fA6WJyzNg/hRdbhPID6bKd QpDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature; bh=LUki8oUUsALAZDBQ6UZLGbPGDE9cY6FFUsATWmaNRmY=; b=r7+v9eTMvOjLiU2Ahx5A9/0nhlbqw5S8iW8jby6W9/0xjZ4fgcWooqnqFKo24PbrU9 beMh21+Hgh8ExKTvDpEQ6SbeOnWEX8Jry1LxgK0mjR2R033ZK1vlfwlVUGz4oShF8j1+ r1NXKdPr1gOzRzY8NN9fswAfdrowRMWiCPThSVPxXiAZeMHyCHUdLJgpgxRqapQgl0PK /Lac4LCfPi9Y2KhUjcC4gzIcxzPULZOBHLk/x38WGy1AM0LUP0E1JzJPbtAGh9duLYnF zFTCW2aJHPveobCdTImlcellEd7n3DIHWJZew7SVUGkk0UwgZ80l3LqLhs0s2klPpm9X luNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mqD3iIp9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a12si14105710qte.312.2019.09.10.12.34.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2019 12:34:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mqD3iIp9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7luU-0000vv-Mr for patch@linaro.org; Tue, 10 Sep 2019 15:34:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58860) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7lu1-0000vI-IZ for qemu-devel@nongnu.org; Tue, 10 Sep 2019 15:34:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7lu0-0006jq-AQ for qemu-devel@nongnu.org; Tue, 10 Sep 2019 15:34:13 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7lu0-0006jF-31 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 15:34:12 -0400 Received: by mail-wm1-x344.google.com with SMTP id p7so820158wmp.4 for ; Tue, 10 Sep 2019 12:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LUki8oUUsALAZDBQ6UZLGbPGDE9cY6FFUsATWmaNRmY=; b=mqD3iIp9flGmjSzMcePgsI10+nNSL8bqW+4392/VoMZBMpqUZF0IiYrLp8LXWHQHok OFk4BImy9sfJMKBR3Q5b1vv/4nrOnfSD7zP5/E8DzNwnNqFKTYoyVW5xD/LV31hapSc3 EXI+y5+IFTuXSwxuSutA454FRAbleotB0tNq/wJ1UtCQVglfHKoRM80v2NQ02iqQUOwU +lct8UNlzfB4vTaiw9iTujjDskXEL+DDRyPD1oThYRcYmwKOWAfepGnhDS8K8x3guNnV yY7uWkgzLwuKLFwojD92w8x1s5JYbRoHGIkfLtnmEaDfaSR/vzTdLdAd6uetChqKKL6k r1Aw== 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=LUki8oUUsALAZDBQ6UZLGbPGDE9cY6FFUsATWmaNRmY=; b=TXUKWCVsU3juzO+T8IeyYVoyqWYM9ss0x8Xj3zSQh8Ix/Of0bxZd4sRRzSj7F0/dAV SKjLdSzBKLj1cKl+188MgS5uooBPN/1UAC5/zWTtuseochZNNNk13j6aYMRi5uJJMJPz ZqOzvDqQCqGwjH6bCQnBiUOwU1bjQDintfcZdRXM0DlauNHqW/tvYA7LbDrT35qnuHcg njezvCUSnZKIBp5nEwnNY3HYeFNcSkODAGRgF+ABzLdLplTIE1/D7VYlWX+5dUk88qpF ofgZ2lsjmRfFuQ/Flg0ya77emOuoJyVb+w8TOUxyIw3NVBtcsN81UcHqTGyNPbi9tkds ivdg== X-Gm-Message-State: APjAAAUsJAFkNYRzNEP+ocnsP+L/6Cj4nmceGTKn8jsFPj/YMyHEvUpf ZJ0MtU1wfQFL44Q6pR1HV5+PgA== X-Received: by 2002:a1c:a90b:: with SMTP id s11mr942248wme.92.1568144050864; Tue, 10 Sep 2019 12:34:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t13sm33012594wra.70.2019.09.10.12.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 12:34:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A4A901FF87; Tue, 10 Sep 2019 20:34:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 10 Sep 2019 20:34:04 +0100 Message-Id: <20190910193408.28917-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v1 0/4] ELF and (macro) safety 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-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, This is a small re-factoring series which I'll be needing for adding guest architecture awareness to plugins. There is a little clean up of concerns by removing the "template" type behaviour from elf.h into a new elf-types.inc.h file. I then rationalise the ELF related headers to all be in the same place. Finally the actual useful piece of moving the definition of ELF_ARCH out of the two loader files and into an stand alone header. Alex Bennée (4): target/ppc: fix signal delivery for ppc64abi32 elf: move elf.h to elf/elf.h and split out types elf: move elf_ops.h into include/elf/ and rename elf: move ELF_ARCH definition to elf-arch.h bsd-user/elfload.c | 15 +-- contrib/elf2dmp/qemu_elf.h | 2 +- disas.c | 2 +- dump/dump.c | 2 +- dump/win_dump.c | 2 +- hw/alpha/dp264.c | 2 +- hw/arm/armv7m.c | 2 +- hw/arm/boot.c | 2 +- hw/core/loader.c | 7 +- hw/cris/axis_dev88.c | 2 +- hw/cris/boot.c | 2 +- hw/hppa/machine.c | 2 +- hw/i386/multiboot.c | 2 +- hw/i386/pc.c | 2 +- hw/lm32/lm32_boards.c | 2 +- hw/lm32/milkymist.c | 2 +- hw/m68k/an5206.c | 2 +- hw/m68k/mcf5208.c | 2 +- hw/microblaze/boot.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_mipssim.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/moxie/moxiesim.c | 2 +- hw/nios2/boot.c | 2 +- hw/openrisc/openrisc_sim.c | 2 +- hw/pci-host/prep.c | 2 +- hw/ppc/e500.c | 2 +- hw/ppc/mac_newworld.c | 2 +- hw/ppc/mac_oldworld.c | 2 +- hw/ppc/ppc440_bamboo.c | 2 +- hw/ppc/prep.c | 2 +- hw/ppc/sam460ex.c | 2 +- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_vio.c | 2 +- hw/ppc/virtex_ml507.c | 2 +- hw/riscv/boot.c | 2 +- hw/s390x/ipl.c | 2 +- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 2 +- hw/sparc64/sun4u.c | 2 +- hw/tricore/tricore_testboard.c | 2 +- hw/xtensa/sim.c | 2 +- hw/xtensa/xtfpga.c | 2 +- include/elf/elf-arch.h | 109 ++++++++++++++++++++ include/elf/elf-types.inc.h | 63 +++++++++++ include/{ => elf}/elf.h | 42 -------- include/{hw/elf_ops.h => elf/elf_ops.inc.h} | 9 ++ include/hw/core/generic-loader.h | 2 +- linux-user/arm/cpu_loop.c | 2 +- linux-user/elfload.c | 32 ++---- linux-user/main.c | 2 +- linux-user/mips/cpu_loop.c | 2 +- linux-user/ppc/signal.c | 4 +- linux-user/riscv/cpu_loop.c | 2 +- target/arm/arch_dump.c | 2 +- target/i386/arch_dump.c | 2 +- target/ppc/arch_dump.c | 2 +- target/ppc/kvm.c | 2 +- target/s390x/arch_dump.c | 2 +- tcg/arm/tcg-target.inc.c | 2 +- tcg/ppc/tcg-target.inc.c | 2 +- tcg/s390/tcg-target.inc.c | 2 +- tcg/tcg.c | 5 +- tests/tcg/configure.sh | 1 + tests/tcg/multiarch/Makefile.target | 5 - util/getauxval.c | 2 +- 67 files changed, 258 insertions(+), 146 deletions(-) create mode 100644 include/elf/elf-arch.h create mode 100644 include/elf/elf-types.inc.h rename include/{ => elf}/elf.h (98%) rename include/{hw/elf_ops.h => elf/elf_ops.inc.h} (98%) -- 2.20.1