From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 00FD3385840E; Wed, 5 Jan 2022 03:39:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00FD3385840E From: "hjl.tools at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27924] ld.so: Support DT_RELR relative relocation format Date: Wed, 05 Jan 2022 03:39:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2022 03:39:42 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27924 --- Comment #16 from H.J. Lu --- There is another problem. A static PIE with DT_RELR can have 0 DT_RELA entry when all relative relocations are in DT_RELR: [hjl@gnu-tgl-3 DT_RELR-3]$ readelf -d x-static Dynamic section at offset 0xbbd88 contains 24 entries: Tag Type Name/Value 0x000000000000000c (INIT) 0x1000 0x000000000000000d (FINI) 0x8d630 0x0000000000000019 (INIT_ARRAY) 0xb9750 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes) 0x000000000000001a (FINI_ARRAY) 0xb9758 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes) 0x000000006ffffef5 (GNU_HASH) 0x368 0x0000000000000005 (STRTAB) 0x3a0 0x0000000000000006 (SYMTAB) 0x388 0x000000000000000a (STRSZ) 1 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0xbd000 0x0000000000000002 (PLTRELSZ) 576 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x3a8 0x0000000000000007 (RELA) 0x0 0x0000000000000008 (RELASZ) 0 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffb (FLAGS_1) Flags: PIE 0x0000000000000024 (RELR) 0x5e8 0x0000000000000023 (RELRSZ) 312 (bytes) 0x0000000000000025 (RELRENT) 8 (bytes) 0x0000000000000000 (NULL) 0x0 [hjl@gnu-tgl-3 DT_RELR-3]$=20 ld.so doesn't work with 0 DT_RELA entry. --=20 You are receiving this mail because: You are on the CC list for the bug.=