From patchwork Tue May 30 04:21:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 100527 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1925987vqr; Mon, 29 May 2023 21:23:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67eMdyf1HaMPRmre8W7tuvdkOzd4dvZ5hQMnTGFXQLB3GJ42umqwUmpR5djnLhrONRyaZO X-Received: by 2002:a17:907:9455:b0:96f:e2c4:a063 with SMTP id dl21-20020a170907945500b0096fe2c4a063mr1294615ejc.33.1685420585076; Mon, 29 May 2023 21:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685420585; cv=none; d=google.com; s=arc-20160816; b=IlayxDzG5FdO94LTCKCHaAFdXmfyrHdkCDBpxxHPo3mUFoKFtFJ465nrFEMjfq1SDw B7ebjjdgcvTmRFFgb50xw/PKZGiSdVnmwSTI7DWyP7A8GqGgBZSEmSxSfGX0kgHNuNrD 6bWkhqzpqhbjw9OOvI3LpGbOVtwVoT/3ncAf6pLBGJ3Jervjd8u5C3kkXZ29sNV2/SwY 4t0eBaLzf+afqJ8xSU3yDvXAG3N6ByryUWVWpOMqPP3iiTBWqpU1D0ZfJzSVT4NLzk5U xhG/g130Il19pQSHvaG05DsxTUUy/4jS3gSdGKv27JIzreqkgEivr4z+uWyIuTopp5fk +umg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=SvyIdRt1sV+p34umU92AtEyW6VR0iet6wY2+eD84f9Y=; b=jIvdroZ86exF64+812eu0Qo9w2eJ14U+sskpSbJUT4cql8Zt4qAFxYfBfupTMa21Pl cNI783zrBsXRgLtYfuse9hOMFAwlvasij07PSUwOEesrXDCtUhz/vAmlLarQfwGshgeU pJmlYcjKN1k7JyDuJKNfhWOrD6dNOzUH6Ryd5V42a/cNtGsz9RKv3GUEW0m9qgX9MJ3H NM1BX3wQbmD1ly3CLC1Vy5o7XOdlPlHxtZVZTqJuk9TCdcxY95ger0iDJnIoV3ljQ4jn 1lbZBxOOdimO+bOBDfSh0zi57pTqjdz/Hxb/A/Eldtjst68Cz3kCChmyOPr8z5pfvQRW TL9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ooYLRrQC; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id de37-20020a1709069be500b0096a3525cb1fsi3841580ejc.166.2023.05.29.21.23.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 21:23:05 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ooYLRrQC; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2420E385B516 for ; Tue, 30 May 2023 04:22:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2420E385B516 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685420569; bh=SvyIdRt1sV+p34umU92AtEyW6VR0iet6wY2+eD84f9Y=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ooYLRrQCfAYiBZskBiNh0OXeWJK0KfaKRn/h6u7Ln8bNaFNH1mpT/5ThsTONIio7I DtF8YZrVo5ewQYwYfuhhZ753zmbBlhe82Ruaa3rQ3dSoVGNFOkwO/J682ykdWsxqQj A1qALscDO3sQSeVr1WxcURoUmAlrf5MdORpG9B2Y= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 02CA63856DD6 for ; Tue, 30 May 2023 04:22:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02CA63856DD6 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-5346d150972so3534017a12.3 for ; Mon, 29 May 2023 21:21:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685420518; x=1688012518; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SvyIdRt1sV+p34umU92AtEyW6VR0iet6wY2+eD84f9Y=; b=CnHElFYmjroE7eHOc36i0SfcSiwZXKBvqwFtUstwWcwxZKGUXh4DHBSWo6FDGRcVVe H47fhNx8vTEnfQ0LzZAfwjn/0MCPtuTy/lVwu5KL6b1OeBdWfBA7yw8mdI3R3vRiz7sk g4Glv/8PKUUg0we14jLSHIxvFY/6eGGC//INhSpOAd14XjG3N888ZLLa5qfx7gtSXe3u yKMESs+rXQ8QI/P2z9JMnt7z4rXW5dxVghppNV8lNJqL3CSX9S5RRE4NHtLJADQ7QiW8 hq0Ov/BE0bNTLRt3yh9hfQyJ7Lw+WOWg9KJRKEcKNIjmkzB3l5DQcPJGNipUkUFS7a2M QosQ== X-Gm-Message-State: AC+VfDzjdK1qel5Sz8cK03uSQPmFZ2d2m2uPpHqbWLtp7ByhyWU7MSt4 CimbFuID3UzEnIFncRvPyNczaKhngO0= X-Received: by 2002:a17:903:110e:b0:1af:bfb0:e7e4 with SMTP id n14-20020a170903110e00b001afbfb0e7e4mr1412250plh.36.1685420518484; Mon, 29 May 2023 21:21:58 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id t13-20020a1709028c8d00b001ac741dfd29sm8969104plo.295.2023.05.29.21.21.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 21:21:57 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id DAD231142C22; Tue, 30 May 2023 13:51:55 +0930 (ACST) Date: Tue, 30 May 2023 13:51:55 +0930 To: binutils@sourceware.org Subject: Delete include/aout/encap.h Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.8 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767291575417241366?= X-GMAIL-MSGID: =?utf-8?q?1767291575417241366?= This file is unused and as the header comment says, obsolete. diff --git a/include/aout/encap.h b/include/aout/encap.h deleted file mode 100644 index ffd4ca4d04c..00000000000 --- a/include/aout/encap.h +++ /dev/null @@ -1,135 +0,0 @@ -/* Yet Another Try at encapsulating bfd object files in coff. - Copyright (C) 1988-2023 Free Software Foundation, Inc. - Written by Pace Willisson 12/9/88 - - This file is obsolete. It needs to be converted to just define a bunch - of stuff that BFD can use to do coff-encapsulated files. --gnu@cygnus.com - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - MA 02110-1301, USA. */ - -/* - * We only use the coff headers to tell the kernel - * how to exec the file. Therefore, the only fields that need to - * be filled in are the scnptr and vaddr for the text and data - * sections, and the vaddr for the bss. As far as coff is concerned, - * there is no symbol table, relocation, or line numbers. - * - * A normal bsd header (struct exec) is placed after the coff headers, - * and before the real text. I defined a the new fields 'a_machtype' - * and a_flags. If a_machtype is M_386, and a_flags & A_ENCAP is - * true, then the bsd header is preceeded by a coff header. Macros - * like N_TXTOFF and N_TXTADDR use this field to find the bsd header. - * - * The only problem is to track down the bsd exec header. The - * macros HEADER_OFFSET, etc do this. - */ - -#define N_FLAGS_COFF_ENCAPSULATE 0x20 /* coff header precedes bsd header */ - -/* Describe the COFF header used for encapsulation. */ - -struct coffheader -{ - /* filehdr */ - unsigned short f_magic; - unsigned short f_nscns; - long f_timdat; - long f_symptr; - long f_nsyms; - unsigned short f_opthdr; - unsigned short f_flags; - /* aouthdr */ - short magic; - short vstamp; - long tsize; - long dsize; - long bsize; - long entry; - long text_start; - long data_start; - struct coffscn - { - char s_name[8]; - long s_paddr; - long s_vaddr; - long s_size; - long s_scnptr; - long s_relptr; - long s_lnnoptr; - unsigned short s_nreloc; - unsigned short s_nlnno; - long s_flags; - } scns[3]; -}; - -/* Describe some of the parameters of the encapsulation, - including how to find the encapsulated BSD header. */ - -/* FIXME, this is dumb. The same tools can't handle a.outs for different - architectures, just because COFF_MAGIC is different; so you need a - separate GNU nm for every architecture!!? Unfortunately, it needs to - be this way, since the COFF_MAGIC value is determined by the kernel - we're trying to fool here. */ - -#define COFF_MAGIC_I386 0514 /* I386MAGIC */ -#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */ - -#ifdef COFF_MAGIC -short __header_offset_temp; -#define HEADER_OFFSET(f) \ - (__header_offset_temp = 0, \ - fread ((char *)&__header_offset_temp, sizeof (short), 1, (f)), \ - fseek ((f), -sizeof (short), 1), \ - __header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0) -#else -#define HEADER_OFFSET(f) 0 -#endif - -#define HEADER_SEEK(f) (fseek ((f), HEADER_OFFSET((f)), 1)) - -/* Describe the characteristics of the BSD header - that appears inside the encapsulation. */ - -/* Encapsulated coff files that are linked ZMAGIC have a text segment - offset just past the header (and a matching TXTADDR), excluding - the headers from the text segment proper but keeping the physical - layout and the virtual memory layout page-aligned. - - Non-encapsulated a.out files that are linked ZMAGIC have a text - segment that starts at 0 and an N_TXTADR similarly offset to 0. - They too are page-aligned with each other, but they include the - a.out header as part of the text. - - The _N_HDROFF gets sizeof struct exec added to it, so we have - to compensate here. See . */ - -#undef _N_HDROFF -#undef N_TXTADDR -#undef N_DATADDR - -#define _N_HDROFF(x) ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \ - sizeof (struct coffheader) : 0) - -/* Address of text segment in memory after it is loaded. */ -#define N_TXTADDR(x) \ - ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \ - sizeof (struct coffheader) + sizeof (struct exec) : 0) -#define SEGMENT_SIZE 0x400000 - -#define N_DATADDR(x) \ - ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \ - (SEGMENT_SIZE + ((N_TXTADDR(x)+(x)->a_text-1) & ~(SEGMENT_SIZE-1))) : \ - (N_TXTADDR(x)+(x)->a_text))