From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63E583858285; Mon, 8 Aug 2022 11:33:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63E583858285 From: "arek at hiler dot eu" To: glibc-bugs@sourceware.org Subject: [Bug build/29456] missing DT_HASH section in shared objects Date: Mon, 08 Aug 2022 11:33:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arek at hiler dot eu X-Bugzilla-Status: UNCONFIRMED 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: Mon, 08 Aug 2022 11:33:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29456 --- Comment #2 from Arkadiusz Hiler --- Hi, thanks for the reply. I wonder where the defaulting to having only DT_GNU_HASH is coming from? Quoting ld's man page: --hash-style=3Dstyle Set the type of linker's hash table(s). style can be either "sysv" for classic ELF ".hash" section, "gnu" for new style GNU ".gnu.hash" section or "both" for both the classic ELF ".hash" and new style GNU ".gnu.hash" hash tables. The default depends upon how the linker was configured, but for most Linux based systems it will be "both". and indeed `ld --help` claims: --hash-style=3DSTYLE Set hash style to sysv/gnu/both. Default= : both As a sidenote mold defaults to sysv style hashes[0] and the format is well documented[1], whereas for the GNU-style one you have to read the sources of one of the implementations or rely on blog posts. The change also breaks existing software, not sure what glibc's stance is on that. [0]: https://github.com/rui314/mold/blob/415673a49e24b1f4189000b9eb4fb1a36a69709= 3/elf/mold.h#L1475 [1]: https://refspecs.linuxfoundation.org/elf/gabi41.pdf section 5-21 --=20 You are receiving this mail because: You are on the CC list for the bug.=