From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A36A3858D32; Mon, 27 Feb 2023 13:15:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A36A3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677503721; bh=aEMw/FGu+rBzlySgkCpDH/fMqtn8e8IVe+A/V0JuLB8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dorFuOc/4r9efnpBfGuR0pYDysjVvuRhGxRhMoq10nzIYi/aQTB79QQMhcnoelrNl 6PkjjdXVu5kBDI2Iwm9hbSr/Z6/T8AFwaAcy0+p7HKzPBNaP6mKCutBLirhzbbdfGk Yrd2nRfBXnAOhET+wWDoG4+QfEdQ4qyIMLMrXPT4= From: "rob.meades@u-blox.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108940] Offset of pointer to global variable not set correctly for position independent executable Date: Mon, 27 Feb 2023 13:15:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rob.meades@u-blox.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108940 --- Comment #2 from Rob Meades --- Created attachment 54545 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54545&action=3Dedit Disassembly of executable file Here is the complete disassembly of the executable output file: we do indeed seem to be missing a .reloc section. I guess we should be specifying a fla= g to the linker to obtain this?=