From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#24703: Store references in 8-byte chunks in compiled code Date: Sun, 16 Oct 2016 05:03:29 -0400 Message-ID: <87k2d8sm1q.fsf@netris.org> References: <87mvi5lzqu.fsf@netris.org> <87inssncln.fsf@netris.org> <8737jwnb1c.fsf@netris.org> <87r37gstf6.fsf_-_@netris.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvhMU-0006rB-BF for bug-guix@gnu.org; Sun, 16 Oct 2016 05:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvhMQ-0001le-Cg for bug-guix@gnu.org; Sun, 16 Oct 2016 05:04:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55547) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvhMQ-0001lY-A2 for bug-guix@gnu.org; Sun, 16 Oct 2016 05:04:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87r37gstf6.fsf_-_@netris.org> (Mark H. Weaver's message of "Sun, 16 Oct 2016 02:24:13 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 24703@debbugs.gnu.org The 8-byte chunks may appear out of order. For example, in 'bash-static' we have this reference to: /gnu/store/7z3hpynjsbidxkq78xi5qi6lbcm8ndhp-glibc-intermediate-2.23 where the chunks are found in the following order: 1_/gnu/sto 2_________________ynjsbidx 3_________re/7z3hp 4_________________________________i6lbcm8n 5_________________________kq78xi5q 6_________________________________________dhp-glib 7_________________________________________________c-interm 8_________________________________________________________ediate-2 9_________________________________________________________________.23/lib/ Here's an excerpt of "objdump -d" output, annotated to show the 8-byte constant as a string, and its position within the larger string. ======== /gnu/store/0010wvgs40kdq8chzsh403qm7la9jxq7-bash-static-4.3.42/bin/bash 46b2c3: 48 b9 2f 67 6e 75 2f movabs $0x6f74732f756e672f,%rcx ; "/gnu/sto" (1) 46b2ca: 73 74 6f 46b2cd: 48 01 d8 add %rbx,%rax 46b2d0: 48 bb 79 6e 6a 73 62 movabs $0x78646962736a6e79,%rbx ; "ynjsbidx" (3) 46b2d7: 69 64 78 46b2da: 48 89 48 01 mov %rcx,0x1(%rax) 46b2de: 48 b9 72 65 2f 37 7a movabs $0x7068337a372f6572,%rcx ; "re/7z3hp" (2) 46b2e5: 33 68 70 46b2e8: 48 89 58 11 mov %rbx,0x11(%rax) 46b2ec: 48 89 48 09 mov %rcx,0x9(%rax) 46b2f0: 48 bb 69 36 6c 62 63 movabs $0x6e386d63626c3669,%rbx ; "i6lbcm8n" (5) 46b2f7: 6d 38 6e 46b2fa: 48 b9 6b 71 37 38 78 movabs $0x713569783837716b,%rcx ; "kq78xi5q" (4) 46b301: 69 35 71 46b304: 48 89 48 19 mov %rcx,0x19(%rax) 46b308: 48 89 58 21 mov %rbx,0x21(%rax) 46b30c: 48 b9 64 68 70 2d 67 movabs $0x62696c672d706864,%rcx ; "dhp-glib" (6) 46b313: 6c 69 62 46b316: 48 bb 63 2d 69 6e 74 movabs $0x6d7265746e692d63,%rbx ; "c-interm" (7) 46b31d: 65 72 6d 46b320: 48 89 48 29 mov %rcx,0x29(%rax) 46b324: ba 76 00 00 00 mov $0x76,%edx 46b329: 48 89 58 31 mov %rbx,0x31(%rax) 46b32d: 48 b9 65 64 69 61 74 movabs $0x322d657461696465,%rcx ; "ediate-2" (8) 46b334: 65 2d 32 46b337: 48 bb 2e 32 33 2f 6c movabs $0x2f62696c2f33322e,%rbx ; ".23/lib/" (9) 46b33e: 69 62 2f 46b341: 48 89 58 41 mov %rbx,0x41(%rax) 46b345: 31 f6 xor %esi,%esi 46b347: 31 ff xor %edi,%edi 46b349: c6 00 3a movb $0x3a,(%rax) 46b34c: 48 89 48 39 mov %rcx,0x39(%rax) 46b350: c7 40 49 67 63 6f 6e movl $0x6e6f6367,0x49(%rax) 46b357: 66 89 50 4d mov %dx,0x4d(%rax)