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 12A6A3986431 for ; Sun, 20 Nov 2022 16:37:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 12A6A3986431 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 s12so13266670edd.5 for ; Sun, 20 Nov 2022 08:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Tgo8zXbDNoUaJbUTCAf51tJ1zAQHryKHNS9RCLRg4M0=; b=Jx57UGoCJbRfLPfWoo4oSRYRXhMye50pXzocZklI9SZ11Gpp3LRDRRbq1NzUohnzr2 4SZDJhRASSbtzfD1UqG7J5aJWUBTVxGy2J2b9GAykyShxzNxWmOgtYYA50oo6+p9dVxF /cRgauOeq2EuUCOUGTAUBuRi0ND2QY2s7mOOV9E68av5bRSnkxGzSB1SLoH7aX15+lt9 j9eOp8pHUHm1OlLYV2/yUDGD/8DMt4YQmroCLIU/ZzM6Kmq40dXU1l365XushMdgopje fyUrxoKayviaSisKVPCY53i949X6m6tTFLXdZ9wYVXuebEZf/0cmPWJrXKSctCv17B5j VuEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Tgo8zXbDNoUaJbUTCAf51tJ1zAQHryKHNS9RCLRg4M0=; b=M3RAMGYzs8Zlo692E8vqp8SrEKluPktKjGnxTv6+hRI3aEhmSKMY/jJtXlHrtCWUqK utPTcXoLwXWt4iZVjpWL9a+ClawokfVmNmHCbICo37zDVaat2oAi+Q2jcynto4olzNZh odGHnBTLSwbq/qLXZ0K0juJaxM4bppcOsgUUMiOfMBokbv2usiXLRX/UoS4BjrpemzL1 uKPaUEm/yOAXj+i0rKxAh5phDa3OwzRcjgGTPxuAtfon5oNGQZ2a7T6kMcqM/7y1TveO yLHpt0foqwNt8PBHUQOddeoNtm9OnI+ICX0tMCYDQdpr00fzPxmxuRHiTBtyEzoMZ52n sFAg== X-Gm-Message-State: ANoB5pm54yhbM3ZJV/wDcfISjGA83SzSgB0mEvsWhz3Ih1H4/hovh6+r 7wkGmGE4Lk6yzmev3s/lXrZEQrsbBHqVZ8DA5ktrXUpcwqI= X-Google-Smtp-Source: AA0mqf68LhtUPsl3/OLIvsTI7YOfdcUqWanm/j7swSCrnDbTnG4KSUiBGSPNfy2BkrljjwrHVzhurmgV0HcwaHxulF0= X-Received: by 2002:a50:9fa7:0:b0:469:4e6:344f with SMTP id c36-20020a509fa7000000b0046904e6344fmr10188244edf.226.1668962245320; Sun, 20 Nov 2022 08:37:25 -0800 (PST) MIME-Version: 1.0 From: Tom Kacvinsky Date: Sun, 20 Nov 2022 11:37:14 -0500 Message-ID: Subject: Question about readelf output from shared library built with lld, gold, and bfd linkers To: Binutils Content-Type: multipart/alternative; boundary="000000000000c6a3b305ede98dfb" 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: --000000000000c6a3b305ede98dfb Content-Type: text/plain; charset="UTF-8" Isee the following output from readelf for the lld, gold and bfd linkers (binutils 2.39, lld 14.0.6) Output below. Notice how the ordering is different in each case. The interesting thing about this is, and why I am looking at various differences between object code linked by these three linkers, is that I am trying to track down why startup times are slower due to relocations (based on the perf tool output). Would any of these differences make, well, a difference in startup time? Thanks, Tom Output from readelf for the different linkers. The particular function is irrelevant, it happens with other symbols as well. lld linker: readelf -Wa libVcAppLib.so | grep ada__strings__search__index 000000000162e508 000055c800000007 R_X86_64_JUMP_SLOT 0000000001571220 ada__strings__search__index + 0 000000000162e510 0000587700000007 R_X86_64_JUMP_SLOT 0000000001570a30 ada__strings__search__index__2 + 0 000000000162e518 0000587d00000007 R_X86_64_JUMP_SLOT 0000000001570c40 ada__strings__search__index__3 + 0 000000000162e520 0000588400000007 R_X86_64_JUMP_SLOT 00000000015715d0 ada__strings__search__index__4 + 0 000000000162e528 0000588a00000007 R_X86_64_JUMP_SLOT 0000000001570d00 ada__strings__search__index__5 + 0 000000000162e530 0000588d00000007 R_X86_64_JUMP_SLOT 0000000001570dd0 ada__strings__search__index__6 + 0 000000000162e540 000003fe00000007 R_X86_64_JUMP_SLOT 0000000001570ea0 ada__strings__search__index_non_blank + 0 000000000162e548 0000278900000007 R_X86_64_JUMP_SLOT 0000000001570f00 ada__strings__search__index_non_blank__2 + 0 1022: 0000000001570ea0 91 FUNC GLOBAL DEFAULT 14 ada__strings__search__index_non_blank 10121: 0000000001570f00 167 FUNC GLOBAL DEFAULT 14 ada__strings__search__index_non_blank__2 21960: 0000000001571220 930 FUNC GLOBAL DEFAULT 14 ada__strings__search__index 22647: 0000000001570a30 523 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__2 22653: 0000000001570c40 187 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__3 22660: 00000000015715d0 207 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__4 22666: 0000000001570d00 207 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__5 22669: 0000000001570dd0 199 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__6 36851: 0000000001571220 930 FUNC GLOBAL DEFAULT 14 ada__strings__search__index 36853: 0000000001570a30 523 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__2 36854: 0000000001570c40 187 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__3 36856: 00000000015715d0 207 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__4 36858: 0000000001570d00 207 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__5 36860: 0000000001570dd0 199 FUNC GLOBAL DEFAULT 14 ada__strings__search__index__6 36862: 0000000001570ea0 91 FUNC GLOBAL DEFAULT 14 ada__strings__search__index_non_blank 36864: 0000000001570f00 167 FUNC GLOBAL DEFAULT 14 ada__strings__search__index_non_blank__2 gold linker: readelf -Wa libVcAppLib.so | grep ada__strings__search__index 0000000001610048 00000f0600000007 R_X86_64_JUMP_SLOT 000000000115a220 ada__strings__search__index + 0 0000000001610050 00003fa300000007 R_X86_64_JUMP_SLOT 0000000001159a30 ada__strings__search__index__2 + 0 0000000001610058 00003fa600000007 R_X86_64_JUMP_SLOT 0000000001159c40 ada__strings__search__index__3 + 0 0000000001610060 00003fa800000007 R_X86_64_JUMP_SLOT 000000000115a5d0 ada__strings__search__index__4 + 0 0000000001610068 00003fa900000007 R_X86_64_JUMP_SLOT 0000000001159d00 ada__strings__search__index__5 + 0 0000000001610070 00003fad00000007 R_X86_64_JUMP_SLOT 0000000001159dd0 ada__strings__search__index__6 + 0 0000000001610078 0000075000000007 R_X86_64_JUMP_SLOT 0000000001159ea0 ada__strings__search__index_non_blank + 0 0000000001610080 000050cb00000007 R_X86_64_JUMP_SLOT 0000000001159f00 ada__strings__search__index_non_blank__2 + 0 1872: 0000000001159ea0 91 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank 3846: 000000000115a220 930 FUNC GLOBAL DEFAULT 12 ada__strings__search__index 16291: 0000000001159a30 523 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__2 16294: 0000000001159c40 187 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__3 16296: 000000000115a5d0 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__4 16297: 0000000001159d00 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__5 16301: 0000000001159dd0 199 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__6 20683: 0000000001159f00 167 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank__2 16810: 0000000001159f00 167 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank__2 16812: 0000000001159ea0 91 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank 16814: 0000000001159dd0 199 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__6 16816: 0000000001159d00 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__5 16818: 000000000115a5d0 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__4 16820: 0000000001159c40 187 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__3 16821: 0000000001159a30 523 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__2 16823: 000000000115a220 930 FUNC GLOBAL DEFAULT 12 ada__strings__search__index bfd linker: readelf -Wa libVcAppLib.so | grep ada__strings__search__index 00000000015db948 00003fa600000007 R_X86_64_JUMP_SLOT 000000000114fa20 ada__strings__search__index__2 + 0 00000000015de700 00003fa800000007 R_X86_64_JUMP_SLOT 000000000114fc30 ada__strings__search__index__3 + 0 00000000015e1908 0000075200000007 R_X86_64_JUMP_SLOT 000000000114fe90 ada__strings__search__index_non_blank + 0 00000000015e55c8 00000f0a00000007 R_X86_64_JUMP_SLOT 0000000001150210 ada__strings__search__index + 0 00000000015e6e40 00003fae00000007 R_X86_64_JUMP_SLOT 000000000114fdc0 ada__strings__search__index__6 + 0 00000000015ec3a0 00003faa00000007 R_X86_64_JUMP_SLOT 00000000011505c0 ada__strings__search__index__4 + 0 00000000015edb08 000050cd00000007 R_X86_64_JUMP_SLOT 000000000114fef0 ada__strings__search__index_non_blank__2 + 0 00000000015ef168 00003fad00000007 R_X86_64_JUMP_SLOT 000000000114fcf0 ada__strings__search__index__5 + 0 1874: 000000000114fe90 91 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank 3850: 0000000001150210 930 FUNC GLOBAL DEFAULT 12 ada__strings__search__index 16294: 000000000114fa20 523 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__2 16296: 000000000114fc30 187 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__3 16298: 00000000011505c0 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__4 16301: 000000000114fcf0 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__5 16302: 000000000114fdc0 199 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__6 20685: 000000000114fef0 167 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank__2 16406: 000000000114fa20 523 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__2 19426: 000000000114fc30 187 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__3 22716: 000000000114fe90 91 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank 26768: 0000000001150210 930 FUNC GLOBAL DEFAULT 12 ada__strings__search__index 28382: 000000000114fdc0 199 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__6 34154: 00000000011505c0 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__4 35651: 000000000114fef0 167 FUNC GLOBAL DEFAULT 12 ada__strings__search__index_non_blank__2 37103: 000000000114fcf0 207 FUNC GLOBAL DEFAULT 12 ada__strings__search__index__5 --000000000000c6a3b305ede98dfb--