From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 87EFC38515D9 for ; Tue, 20 Apr 2021 14:18:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 87EFC38515D9 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 67E61340ECB; Tue, 20 Apr 2021 14:18:40 +0000 (UTC) Date: Tue, 20 Apr 2021 10:18:39 -0400 From: Mike Frysinger To: Peng Yu Cc: libc-help Subject: Re: Best reference for understanding ELF format Message-ID: Mail-Followup-To: Peng Yu , libc-help References: <20210419072902.GB9028@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, 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 14:18:50 -0000 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). > Please provide useful information instead of nonsense like this. you've been given so much already, and yet you balk at it. 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. -mike