From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 656E93850402 for ; Tue, 20 Apr 2021 16:39:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 656E93850402 Received: by mail-io1-xd2c.google.com with SMTP id h141so30740775iof.2 for ; Tue, 20 Apr 2021 09:39:39 -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:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Tg+xqCkLQtJP2c+JmjY+ISFLkGPk0BZyiT/ZtFpWFVs=; b=R7/Nz63T9NRCDaBqKYSpek++VuEt1I7HyoN5vU3RnLVniA55ZGgERPRRKykeKjs3h7 +AWlBL6hzJuMXjeWd+n93Z3tH0okxcfWVzSCSxTzHWu0X9n9gaWnL2iHD/4l5xc6RQQ1 Ex7z+YRAPzZidMG5UPh+7NFUGNXDKX1MEvtsMCNU+sqaBmjeRu6LHGwVRDMXTA7t3juZ BR93aefmXNbKRg59y52fnxKCOG7hhc00jTIPonVXvT263iDs3llAOtkxZBMF4rj0VcLD fHCmZ5k+FYW6P/j72r6Wv8H3YusHNDZQHn5+4jWww0ukeAJOq2eUdY1UYhK0KzxU64Pl /9cA== X-Gm-Message-State: AOAM530V8rmTE/EYZWur9joAWc2DXXGRGN+WdY7o9JlmmfdWNOG9y3XF lW3G5kZfhksxIZuOWDtL8+ODzoGXTICHJrZVYJHr67tDaXKc7Q== X-Google-Smtp-Source: ABdhPJzWYNo73c6+E1cX7HO5EqIwyreCFpE2n1HEaMA2KpBkAeb4stS2sl86+UzC5Bq6tul20q2n9c8/fke2YefstMU= X-Received: by 2002:a6b:6b15:: with SMTP id g21mr2783764ioc.28.1618936779030; Tue, 20 Apr 2021 09:39:39 -0700 (PDT) MIME-Version: 1.0 References: <20210419072902.GB9028@arm.com> In-Reply-To: Reply-To: noloader@gmail.com From: Jeffrey Walton Date: Tue, 20 Apr 2021 12:39:26 -0400 Message-ID: Subject: Re: Best reference for understanding ELF format To: Peng Yu Cc: libc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 16:39:41 -0000 On Tue, Apr 20, 2021 at 12:29 PM Peng Yu via Libc-help wrote: > ... > 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. I think Clang can produce object files directly. Clang has an integrated assembler. On OS X, sometimes you need to use -Wa,-q to enlist the Clang Integrated Assembler because GNU toolchain is too old to consume code for some ISA's, like AVX and AVX2. (That's assuming you're using a modern GCC, like from Macports or Homebrew). That's why -Wa,-q shows up in places like https://github.com/weidai11/cryptopp/blob/master/GNUmakefile#L109. Jeff