Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp500890pxa; Fri, 21 Aug 2020 12:48:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsOMB7hxRQq8MN/41YjFiTkoK4bOyU5qVnZaM3IDQYUOCRSMQ8jX9I3QCN6EzvE+VpU4ek X-Received: by 2002:a05:6402:1593:: with SMTP id c19mr4656959edv.318.1598039293136; Fri, 21 Aug 2020 12:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598039293; cv=none; d=google.com; s=arc-20160816; b=azmLMEwgvYdBE5eUGSE0TLnP+rIrF4smwgq2iB/C882+8jMVfsRzeT7GzOv+yUGTIL sGc51/4+UWMnd6AwWmVSkOfQylpefLErjNcGZ+YeZ3BLIQouwqt2dd9L3KIEtREBghWz 885UMTjLUw3/oIC44IRuBA+mxGnFYVJnsVS1sjCMfUNMAZGZRfpb/407xUigSxLLQr+0 Hev6lk8TLDc8q0kfOdaAfNNATmkfnqDo9808Luz8CmatUli3YqDrDhA6N3A0seB1OGRK 0yOZhijSDT2YXOIXTHypSWXaSsA5B2QR7s/UnmyWpv8RDfPnzVzMlIiHZ6Lm6vxbjcT2 0O6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UQO/PcZpzZoe4IDChCWVkIxZf7tzI4XyeCxPmxC8FNI=; b=RFhvdkKIPNceUTVtI0m0izDAb5RBgAeyNZhiAJhp1sdzNYL3JzJiv1gUHVkZawxc6b CnjB0E76y2eNHcnF4Fma+vnaNMIyGjlRaREbraitfNYnbf3DPwan59AxVdkOrAtm6XLD E/OLAqTyksoiJ67fsHxnxKYDT+dtabwqWdyp2GMQmQA/SswD2ye7YBWgJKuhGMpEc+yo TXliT9cjGHuCxUu4ka8bsDh8WSy1ukrMJEAizoJE+wo4R01tiIcsr8W6jr52XuAEqCQ0 SsP/mfFPJn65xSPYjrO2gk3SM1Fp79Fe9ApEvLtPNp/5HFYY97xxH6Eu9Mepof5UFFOe bCPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NugASbhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si1856246edt.468.2020.08.21.12.47.50; Fri, 21 Aug 2020 12:48:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NugASbhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbgHUTqZ (ORCPT + 99 others); Fri, 21 Aug 2020 15:46:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726706AbgHUTo2 (ORCPT ); Fri, 21 Aug 2020 15:44:28 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D681AC06179E for ; Fri, 21 Aug 2020 12:44:24 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id 2so1255784pjx.5 for ; Fri, 21 Aug 2020 12:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UQO/PcZpzZoe4IDChCWVkIxZf7tzI4XyeCxPmxC8FNI=; b=NugASbhHSLh4kJaKioodD/JRBqxUb7xOPm32oHVQ+brGiQkrNwDazPLYjk/bxUb9bc /X3UF/vMGgpmdxRlcpCXroq0TzwIcsJIZZtD6ra9JycErhlpr22IdOIR9+9MRF/J7oq1 4bN0HYcBhFQjhXKHHlOrjY2hDTe3dCGXNj624= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UQO/PcZpzZoe4IDChCWVkIxZf7tzI4XyeCxPmxC8FNI=; b=gpSy7CtEZY00gsLpzkZqAWk1dJT9yVWU8LO6X3KdH7awVo9APti95IRAa52PiSICAh XidXY6G7Ix+SepkOijH3ejFa7O5alGVzsKl+c5sg9PNo7q9wBwEDNRIo0caDLWp6LZE+ L0YzpG4OLetQhVxskrcf9Xi7thY1slcv8S2O7Iu+oVNYTgKFNhcwzfg1p9LeGqprLFGh w+98yv0lwiXFwBQQsgmoXiXX0S1u4XmJZ3hugntLPSp/vBPshCiW8jjfhj+s+hFQTDIi tSqzv5Rtgt2q8ZhGAXl4sazXsudDOTNff3454pQJKh9xc/DJ9ukv8Jk8wWRZa8tJxGrU nOYA== X-Gm-Message-State: AOAM530B6/1/G3knDlXHY33XCIN5RbNMkoUnKa5NGBI5+/2fAAEKpdi4 u9DFX1EYQq7y37pwgtEZMyNIow== X-Received: by 2002:a17:902:8609:: with SMTP id f9mr3642315plo.324.1598039064310; Fri, 21 Aug 2020 12:44:24 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id n1sm3563798pfu.2.2020.08.21.12.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 12:44:21 -0700 (PDT) From: Kees Cook To: Ingo Molnar Cc: Kees Cook , Fangrui Song , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , x86@kernel.org, clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 05/29] vmlinux.lds.h: Add .symtab, .strtab, and .shstrtab to ELF_DETAILS Date: Fri, 21 Aug 2020 12:42:46 -0700 Message-Id: <20200821194310.3089815-6-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200821194310.3089815-1-keescook@chromium.org> References: <20200821194310.3089815-1-keescook@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When linking vmlinux with LLD, the synthetic sections .symtab, .strtab, and .shstrtab are listed as orphaned. Add them to the ELF_DETAILS section so there will be no warnings when --orphan-handling=warn is used more widely. (They are added above comment as it is the more common order[1].) ld.lld: warning: :(.symtab) is being placed in '.symtab' ld.lld: warning: :(.shstrtab) is being placed in '.shstrtab' ld.lld: warning: :(.strtab) is being placed in '.strtab' [1] https://lore.kernel.org/lkml/20200622224928.o2a7jkq33guxfci4@google.com/ Reported-by: Fangrui Song Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index cadcbc3cdabd..98d013dcc11a 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -823,7 +823,10 @@ /* Required sections not related to debugging. */ #define ELF_DETAILS \ - .comment 0 : { *(.comment) } + .comment 0 : { *(.comment) } \ + .symtab 0 : { *(.symtab) } \ + .strtab 0 : { *(.strtab) } \ + .shstrtab 0 : { *(.shstrtab) } #ifdef CONFIG_GENERIC_BUG #define BUG_TABLE \ -- 2.25.1