From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130557 invoked by alias); 24 Feb 2020 09:10:27 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 130546 invoked by uid 89); 24 Feb 2020 09:10:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=Pages, ment, GPG, suse X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Feb 2020 09:10:16 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9F54EAC92; Mon, 24 Feb 2020 09:10:14 +0000 (UTC) From: Andreas Schwab To: Stephen Casner Cc: binutils@sourceware.org Subject: Re: Help text for ld magic number options References: X-Yow: Well, I'm INVISIBLE AGAIN.. I might as well pay a visit to the LADIES ROOM... Date: Mon, 24 Feb 2020 09:10:00 -0000 In-Reply-To: (Stephen Casner's message of "Sat, 22 Feb 2020 12:35:41 -0800 (PST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2020-02/txt/msg00526.txt.bz2 On Feb 22 2020, Stephen Casner wrote: > I propose that the help text be changed as follows: > > -n, --nmagic Make text readonly, page align data, no demand paging > -N, --omagic Do not make text readonly, do not page align data > --no-omagic Make text readonly, page align data, do demand paging > > Is that acceptable? This would have implications for the ld > documentation as well. I think there is some confusion about what "alignment" means in this context. Here is what the manpage says: OMAGIC The text and data segments immediately follow the header and are contiguous. The kernel loads both text and data segments into writable memory. NMAGIC As with OMAGIC, text and data segments immediately fol- low the header and are contiguous. However, the kernel loads the text into read-only memory and loads the data into writable memory at the next page boundary after the text. ZMAGIC The kernel loads individual pages on demand from the binary. The header, text segment and data segment are all padded by the link editor to a multiple of the page size. Pages that the kernel loads from the text seg- ment are read-only, while pages from the data segment are writable. The alignment appears to refer to the padding added by the link editor in the ZMAGIC format. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."