From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 902443858C2D for ; Fri, 19 Jan 2024 19:45:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 902443858C2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 902443858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705693559; cv=none; b=UGqNBBX1y1vPZe2QNkUmx6lld/pHb54zxrE0RhrGsokBVmixArYCmEqnO2RtEATHqa2dZG4+HcIRCfd1Bq/BN7PBo9QKbDwIdGoaS9T/0ROnEFyhOzKnpq346ky+6yR8rHePuqwOpMmbCdO2oscdcEKqpHeyoZkxs3Jj3S6u/FE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705693559; c=relaxed/simple; bh=/l2FZuGeJpU/bk2zl7y9IXgWSIUMTl+bhvmLk3r592o=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=w+u8MS+UsqStDfpdi3R9sr/sVlyclNGXzmDntD0mPogbTm7P5iPZsas289abn++IAM4qQr+IbDV0cJpq6NrUhv3XpBuqZx5b/yxnmGIG4y4420TkKi/467q3eU894pu/LwcvuSoVm0YTtmhBjwQXya69CqZ1S1RbROePGgtMgs4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-5ce74ea4bf2so830468a12.0 for ; Fri, 19 Jan 2024 11:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705693554; x=1706298354; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eiRhm/SFhYQSUWcbAheGnWodl8EYmeghEJUA8R94uVw=; b=bwuJsVym02DCg37kolc0RYqUn43pyJtKLtgJ/YJHCd9zqYBOA/XxGhTcYd9hF3hH5e L9Y58xKyJgDX79hix9WJOXX9S8KKfHF92DrP7L5QwGbhogvQU2zwapwxko4vHG9rk+Fz uRETFgodZlBvYdtmuI8wvSNCRFOOKD2Agxo9EAFKQhN1yN0BvwxCRHKmM+mVGXPt6MGJ +B7RPmkPVuCmZL/Tk9Uk5J1IAiXlCW39S01ZvXArDNM8711ZdcYSKsGdDZjnN9YiBKQ/ u37PERZavoBJAMoTT3o8FlnuNYAhg45x9lNfk+oWU6Z5mQ3olXwqcsavMjYDAdnvSWw2 2P4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705693554; x=1706298354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eiRhm/SFhYQSUWcbAheGnWodl8EYmeghEJUA8R94uVw=; b=n1rgSYOyzWhupPasbizp9YkIJfHRUv0/9sZ6RV0n4QqHKLublmp8uyvlv+1fwGpN80 bbr7WWnYOtRsoLZY+PE0dItzLlyQOP2IoACVFtjdZ9FoplCxn4XZ/8wKQrUVjv7A6nmX wS5tLIPrKN1I07XAiJneZ1oW7588SBL6ULWyhao0clxlSy5IVFmj/B9k7GAfjx9uEuu1 xK4Cqkrnj6juIOyq9uA/WodZXSBL/zgyKLmPtj5NKsNJSMOwekWbDZ+houO5/YCzZT2o pNe+NKr+8hbrRQ+L2OGWJK39mJtMYOvH+EzdvSlNwrJFprplbWfwSeD8wpl1dRLTD5oB /YOg== X-Gm-Message-State: AOJu0YzErx64zvoBBQE2969LfqkgkYnWQEOBuen9Bxkh/35RgMaoQStC lXkeBRgQgc6Ul/T/d/08FTJe56uuy+fI1jJAE1LXHyN9yS6j0MGYzIKwCZSW X-Google-Smtp-Source: AGHT+IH1kVo0g/UxicersZH5c3+Wp35lFD3fmMoMwv/VYS0wJzhaOgV9957JYN+KxRPuG0oN8VzQ7A== X-Received: by 2002:a17:90a:e642:b0:290:38f2:8a05 with SMTP id ep2-20020a17090ae64200b0029038f28a05mr485761pjb.5.1705693554471; Fri, 19 Jan 2024 11:45:54 -0800 (PST) Received: from gnu-cfl-3.localdomain ([172.56.168.9]) by smtp.gmail.com with ESMTPSA id sn8-20020a17090b2e8800b0028afdb88d08sm4494177pjb.23.2024.01.19.11.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 11:45:54 -0800 (PST) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id D9A2E7406A1; Fri, 19 Jan 2024 11:45:52 -0800 (PST) From: "H.J. Lu" To: binutils@sourceware.org Cc: goldstein.w.n@gmail.com Subject: [PATCH 4/4] ld: Document --text-section-ordering-file FILE Date: Fri, 19 Jan 2024 11:45:52 -0800 Message-ID: <20240119194552.1255481-5-hjl.tools@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240119194552.1255481-1-hjl.tools@gmail.com> References: <20240119194552.1255481-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3024.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: --text-section-ordering-file FILE is supported only in ELF and PE COFF linkers which support input .text.* sections. * NEWS: Mention --text-section-ordering-file FILE. * ld.texi: Document text-section-ordering-file FILE. --- ld/NEWS | 3 +++ ld/ld.texi | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/ld/NEWS b/ld/NEWS index c3ebe320e5e..c98570f308a 100644 --- a/ld/NEWS +++ b/ld/NEWS @@ -1,5 +1,8 @@ -*- text -*- +* Add the linker option, --text-section-ordering-file FILE, for ELF and + PE COFF linker to specify the input text section order. + Changes in 2.42: * Add -z mark-plt/-z nomark-plt options to x86-64 ELF linker to mark PLT diff --git a/ld/ld.texi b/ld/ld.texi index 4fda259a552..d1bb59202de 100644 --- a/ld/ld.texi +++ b/ld/ld.texi @@ -2541,6 +2541,17 @@ patterns in the linker script. This option will apply @code{SORT_BY_ALIGNMENT} to all wildcard section patterns in the linker script. +@kindex text-section-ordering-file=@file{file} +@item text-section-ordering-file=@file{file} +This option groups input text sections together in the order specified +in the file which contains the list of text section wildcards starting +with @code{.}, separated by whitespace. + +If the @option{verbose} option is enabled, the contents of the text +section ordering file will be reported. + +This option is supported only in ELF and PE COFF linkers. + @kindex --spare-dynamic-tags @item --spare-dynamic-tags=@var{count} This option specifies the number of empty slots to leave in the -- 2.43.0