From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id A4B75385454F for ; Mon, 21 Nov 2022 15:33:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A4B75385454F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x536.google.com with SMTP id z18so16759420edb.9 for ; Mon, 21 Nov 2022 07:33:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=RJcBgCKR2AaVFFOMMamguoVceO2ePG+XdbonC3OFCyw=; b=h0FxB1LGHsP/HdZgRe4ScErW5N8W0eOQU/JYNThwlR+12dwNvYfrXGuMEsH8RmRCx3 zG0d9OkVuOAfZyptJsvb32KFmtUH35I6H8Qi/h6mPdJRk/yJ3z+jOvf5OaUSPqExEyOf G8ql57RNyCHxw/DbpemKjIsiaOWtf+aIP4SNxYc6z6DcDfAS1q2rS4hotrtLNTfyDOS+ oD1g29ysZGX7Mh+7xgEXudWuTgsUBvYZUo2z6XLP6/JJVMBJVGmguJZKtVCQzTzKnDz7 9+qxmHpeuAF08fpopBPAUevOAyLgh0KoIs9jBKcCfqTFdxjvb8q2KuKKG28CgBDax4LN Mc3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RJcBgCKR2AaVFFOMMamguoVceO2ePG+XdbonC3OFCyw=; b=akoItp/eAtEPobUeGmquLiqY9tHxWK9DW3zkRH0BqC4qQbsEk+Djgw+VZpFW9+NE6i n5nm/R9gtCCShLnkkXaPKC74DgIHXL25146WSfsGGPoiPyCgjuOUk5BE5k+uhfaRrH2/ 07lpodP67G1PDKoJQ61Jhq2pvqI1N6Sz7L2sdgWKMU3rubQNQyvd36qhFBqZ/iIvlN0B lDiuQ0TzDVDoTq/OqGFxdTeylre4WOb95aTvi2ZeYBMZWkZ3/P5zHsIKQoVOIM/Zhqki YiDO6NLnabEledu/HEeFHL2kmGLCon5H9bdOwKOuu5lxcX2azv8iQLmyK13QaQNOrPlz r+Lw== X-Gm-Message-State: ANoB5pmU4Adg569y+EGb2h5NAJM8IqvFBcceh8dqDmbdmwX79GiWvz1t iC81gQCLk6tZdfX9EB5Vp/8lpFq7uInPAl0O2Q4LOAK6 X-Google-Smtp-Source: AA0mqf54h1VprCGHL8FmBiV8IUIHjTGkQFDXYoNFTJWNWOJzZjH+LH0vqCUEKskE2VZG68beqND8L9PIDhPyGLHbnvA= X-Received: by 2002:aa7:c94f:0:b0:460:9994:1b9b with SMTP id h15-20020aa7c94f000000b0046099941b9bmr3326897edt.155.1669044808152; Mon, 21 Nov 2022 07:33:28 -0800 (PST) MIME-Version: 1.0 References: <43d57592-85f9-f715-f077-113838a5ee44@redhat.com> In-Reply-To: <43d57592-85f9-f715-f077-113838a5ee44@redhat.com> From: Tom Kacvinsky Date: Mon, 21 Nov 2022 10:33:16 -0500 Message-ID: Subject: Re: Question about readelf output from shared library built with lld, gold, and bfd linkers To: Binutils Content-Type: multipart/alternative; boundary="000000000000e7785d05edfcc647" X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000e7785d05edfcc647 Content-Type: text/plain; charset="UTF-8" On Mon, Nov 21, 2022 at 10:17 AM Nick Clifton wrote: > Hi Tom, > > >> I assume that you have compared started up times when linking with "-z > now" > >> vs "-z lazy" ? > >> > > > > I thought -z lazy was the default, and that if you wanted the equivalent > of > > LD_BIND_NOW=1 on the command line, then one would use -z now. > > It depends upon the environment. In Fedora (and RHEL) "-z now" is the > default. The reason is program security - lazy binding means that an > attacker might be able to alter the relocations before they are evaluated, > allowing all kinds of unexpected things to happen. > Good to know. I am using CentOS 7 with a built from source binutils (2.39) as the system linker is too old to handle the DWARF5 debug symbols made by GCC 12.1 (also built from source). So the modification made by Fedora and RHEL is custom to their distros, right? If so, then I think that I am using -z lazy. Also, a question: would -z combreloc make a difference with relocations at startup? I was just perusing the ld manual and ran across that. Tom --000000000000e7785d05edfcc647--