From patchwork Sat May 16 00:38:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Hawkins X-Patchwork-Id: 135102 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E1D7409F310 for ; Sat, 16 May 2026 00:38:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E1D7409F310 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=obs-cr.20251104.gappssmtp.com header.i=@obs-cr.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=zMPAQrGh X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 0F53140A1FB3 for ; Sat, 16 May 2026 00:38:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F53140A1FB3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=obs.cr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=obs.cr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0F53140A1FB3 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::332 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778891891; cv=none; b=OVuQFVB/8q686xNTvBjEF3kTJAbPfi9MIZf/lzVasfeYjVk90OHLo+40/R+B+Cg43ajocPU2l7DNt7boCuIartNm0d8EYiS6/i1Jcpm/LR401RMzVIxR5zStl3bVbmvR6BbbvrKqpMUwFEeZQbvAfxq57MIxcgLWlX3wsWX4Sj0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778891891; c=relaxed/simple; bh=CFD3EyL+mZ5c4LSjVleDpv5IXq83iVG9AEKDBf78eyg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lvqYRj6nG+7o12AYK5qYqM5nee+JKfCnDwOVqquGVC+3yLzmrVTM2FU1tJMvDzea6JlssDHuqyZSLDdygXRu0dKL1hGOD6F0oOYzvd4QGkWg633u/O1HK9qE/753XfobaZUhJ7WSfD77cwfFzhaCnJyu7Q7Mmk2mh0GVVxqmOpo= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=obs-cr.20251104.gappssmtp.com header.i=@obs-cr.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=zMPAQrGh DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F53140A1FB3 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7dbcb467f2bso458699a34.3 for ; Fri, 15 May 2026 17:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=obs-cr.20251104.gappssmtp.com; s=20251104; t=1778891890; x=1779496690; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=b37RLVfMmT852XYUQG3O25OcdGI4HwzEPxAI+HivK2s=; b=zMPAQrGhgtry1OHQMhB2Ur0uebFjVRAzpSSiHyy4TnylIkEK8B5T57EsxegvUCv2Hy wGtjxC1lyT0SiKn++1Kt849rK7exPW/XAqScluAhY5SLh0DglCQKyDP8DmVYqDZjbQbY RHhJWCyl35jsFEjv4hquXhhDESsdosl6ZZ/8bNfC0FuDZuWcQQGinWG1uIshEzY16n2D AAPdIWYRAiCLP7W2VbEjpXL4GNAGKjiXlXSqb7PTMec6UThwNRGHcdfhltCkNY+739Ri oDSffq3XxA/EqLJEUlYznK0L5EdtPaAAVOqa0DG0DED2AST+WPzrwjheNZFUjVsu0S5m KH9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778891890; x=1779496690; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b37RLVfMmT852XYUQG3O25OcdGI4HwzEPxAI+HivK2s=; b=NL+kVj4PRw6+q56o2GFCdyJyurOKiSy7aRy5rW2mB3fXpyt5wHMVdz0kM8Y13du/DB S3KTgnZdrK1tdSiGwbZLJUpmKcqrGMehtGDqXPkkuXeC9EgD5oCA+nbtyRF84Fo7kunv SY/kSKZ5Gn1YaJVDohQx5h/PCJQcPekVUr+lfT8hsTbkJ+C9CuXyLJzLHQuVWJGeGY75 d/7BO9GCCw7lj94jQ/QAL8/xuZr+JD9ib7q+2e/qacB/0hQIP09iGOl7I9C0waA6f1xt 0i88gVDQI7PTRCqWP28DfINVbNm1OWaDmfk6fnvOruAbXr3g7aFumeNgCZy1r4YLD71B btcQ== X-Gm-Message-State: AOJu0YwgwL31cxicR8rZvFV3PFmzsq7+XcX/J/AbF4HPQpGaEragfKKt e45wJ/YejTGb/rsGbadW3AcsbvMJ4pRlSr1QG4x5Gz58FJh2LgEoePOF+tAA0l+YRy6Qvz5g1Z/ b/BcaBSk= X-Gm-Gg: Acq92OHvF0pxpq62Yk+ttox2Mue/Lfa7wB8vDd17Pi6sy/NO0KxEGiemM2MJnMeFQEz ayz6UMGoLk1BNxT4PK5CqFf8DC5xBEHKv21sAyDoY3zADeMzOEtoCFmJ0uB1r3+BsH4Ju0AH0/r FqIaJBt3NEhy36xHfqNnl4oZ407NQigjPnGXRxCZypsXkAMYczsyDf+mbAhXO4VyXHjf4DQdC7y Nr4l8XApB1CQwaUaEFWaYdGfsP8P6AxGar+2ebAV2AhUBdp1CfGSE1X5ayH170At4JDRf1gCIhg havdcEB3cBpgQg5dicruLzoDZzlsLRYFrbzRxqGytheldX/D5ztoAixmgJ7JJirruyQfAEBEbE0 /ijJryXLjNXw5bCFujBAFNoBkV0/DTzzhJC2t0M8wYs8mXqjV+l9RF3Awq91eTtWbK3I5NiHk6X Q2iCSDzsurUPP5gNs/xfO9urv9CE3UD2OFg+4OPBcRMBDcRKL/NsubV1AHxftdzdBWD7otK/m8w Tis1baxdkdNFLDl5m6h1Piyfm0+4dKOagsW0mhW+4JE7XzEUKzl7olzD5mnnWuwF0Bf X-Received: by 2002:a05:6830:6f8b:b0:7de:4f6b:9e10 with SMTP id 46e09a7af769-7e4de65bc6dmr4415068a34.0.1778891889953; Fri, 15 May 2026 17:38:09 -0700 (PDT) Received: from ininer.rhod.uc.edu ([129.137.96.15]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e55bc4f04fsm2505913a34.27.2026.05.15.17.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 17:38:09 -0700 (PDT) From: Will Hawkins To: binutils@sourceware.org Cc: Will Hawkins Subject: [PATCH] gas: Document @ and % as interchangeable for type argument in .section Date: Fri, 15 May 2026 20:38:04 -0400 Message-ID: <20260516003806.456403-1-hawkinsw@obs.cr> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_PBL, SPF_HELO_NONE, SPF_NONE, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org In the .section Assembler Directive for the ELF format, both the % and the @ can be used when writing the type argument. Clarify the documentation. Signed-off-by: Will Hawkins --- gas/doc/as.texi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gas/doc/as.texi b/gas/doc/as.texi index 3e1d2d0e254..201d9c26b7d 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -7118,13 +7118,12 @@ a numeric value to be set as the ELF section header's type field. some targets extend this list with their own types @end table +Note - the @code{%} character may be used instead of the @code{@@} character +when writing the @var{type} argument constant. + Many targets only support the first three section types. The type may be enclosed in double quotes if necessary. -Note on targets where the @code{@@} character is the start of a comment (eg -ARM) then another character is used instead. For example the ARM port uses the -@code{%} character. - Note - some sections, eg @code{.text} and @code{.data} are considered to be special and have fixed types. Any attempt to declare them with a different type will generate an error from the assembler.