From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id C2D75383B413 for ; Tue, 20 Apr 2021 15:12:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C2D75383B413 Received: by mail-io1-xd30.google.com with SMTP id z14so5332337ioc.12 for ; Tue, 20 Apr 2021 08:12:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=M0YOBs90wKXNeFvKZpGppXl29aGJXNwRIdgPJNQ+V7s=; b=SNsFFZL6Xkbx7Z7AhkpIPADhlcAgq+A3gouH47vQLoyPhAfVfLPQMRJoNRYy37cS93 vZDMPdiepgAmL/w6d2jcMAEPKMDrXkkNVyeR/KBYi6RWK4dj/hTx8XTp6ULy5K+0Es/X kbfzPfYFP7k+Szxd0hexI5clINdmzGkxiyKZdTvu5+7XLfgmKKgAXYwoBah+sOLfwSds 1u/qUP6xnlgC+TMnlqFagfrlCEX2ie0AYK6MUThobhKTCh4wRVr50+NDkg1tcbYT7Dwo tmPAIFMlAS8gIt1TdnloI1cmGlaPZiciJ+My/rjYndFcK5cZebGJTsPlZlZdOPnep6Ak W3fA== X-Gm-Message-State: AOAM533Nwtv6++E/BJM7wWT9kigzS7pzYNHB8cav+EslWW8Nj980D7Fa tWFKftGr66kbeXKWFBCr3alt03sDyy5QtNaEaK6UuCki X-Google-Smtp-Source: ABdhPJxZLGCiCjpRGN96j17bbVS5GpR33FuRPew8xbKa3jAoEVtc3Vtmx8aCKCmZfdnBTLC5njmgDp3T35kS3gdZt3Q= X-Received: by 2002:a6b:b4d3:: with SMTP id d202mr12155989iof.172.1618931561285; Tue, 20 Apr 2021 08:12:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:750f:0:0:0:0:0 with HTTP; Tue, 20 Apr 2021 08:12:40 -0700 (PDT) In-Reply-To: References: <20210419072902.GB9028@arm.com> From: Peng Yu Date: Tue, 20 Apr 2021 10:12:40 -0500 Message-ID: Subject: Re: Best reference for understanding ELF format To: Peng Yu , libc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 15:12:45 -0000 On 4/20/21, Mike Frysinger wrote: > On 20 Apr 2021 08:40, Peng Yu via Libc-help wrote: >> On 4/20/21, Mike Frysinger wrote: >> > On 19 Apr 2021 20:58, Peng Yu via Libc-help wrote: >> >> On 4/19/21, Szabolcs Nagy wrote: >> >> > The 04/17/2021 07:31, Peng Yu via Libc-help wrote: >> >> >> That is a book. By definition, a book will not be complete since a >> >> >> book is not written for completeness? >> >> >> >> >> >> For the best reference (as "reference" may have muliple meanings >> >> >> maybe >> >> >> I should use the word "spec" to avoid ambiguity), I found the >> >> >> following two documents. One is for 32-bit, the other is for >> >> >> 64-bit. >> >> >> Are they the most current ones? Other there any other documents >> >> >> that >> >> >> cover the things missed by them? >> >> >> >> >> >> https://refspecs.linuxfoundation.org/elf/elf.pdf >> >> >> https://www.uclibc.org/docs/elf-64-gen.pdf >> >> > >> >> > elf spec is part of the system v abi document. >> >> > the generic part is in >> >> > http://www.sco.com/developers/gabi/ >> >> > the processor specific part is published separately by >> >> > whoever does the tooling for the particular processor. >> >> > >> >> > (all this can be found out by 5 minute research on wikipedia) >> >> > >> >> > but since you asked for easy-to-follow and for >> >> > understanding elf i think the book is better. >> >> >> >> Updated is also needed. An outdated reference is not preferred even it >> >> is easy to follow. >> > >> > pretty much all the content in the book is still relevant. the fact >> > that >> > it >> > doesn't cover the latest ELF extensions doesn't mean that the >> > fundamentals >> > are >> > no longer relevant. >> > >> >> I found this book is quite outdated. It does not explain the current >> >> gcc and clang. >> > >> > gcc & clang don't produce ELFs. >> >> Then what produces ELFs? gcc/clang output files in ELFs. I don't >> understand what you mean here. > > that is incorrect. gcc & clang are compiler drivers & language frontends. > they produce assembly for the assembler (which is not part of gcc or clang) > which creates object files for the linker (which is not part of gcc or > clang) > which is turned into the final ELF image (e.g. program or library). People don't usually directly call ld to generate object, executable or shared library files. Instead, gcc/clang are called. So there is nothing wrong to say those files are produced by gcc/clang, at least at a superficially level. You can say that gcc/clang don't directly produce the ELF files. Nevertheless, this doesn't add too much to the topic of this thread. >> Please provide useful information instead of nonsense like this. > > you've been given so much already, and yet you balk at it. I've already give justifications why they don't satisfy the three requirements. If there are no such resources, just say so. Don't pretend there is one. > if you aren't > going to accept valid pointers to relevant information, then stop wasting > all of our time and go annoy someone else. like stack overflow. -- Regards, Peng