From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5224E3858C50; Mon, 27 Feb 2023 16:26:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5224E3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677515213; bh=cVjPOANkRkpJ9GcU+fyZ+O4UOZs187izwPHHUuqwc40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YuEhujBk5Ziw/BAapo0c/O3pRUeWuxxVmavvGwtwLT/fKO9tmhn8sExw/a/9sTyoW aUj4bsJ5+iXxKP83pr+FViBsEPfvzrb3uKxipou+M7m3Yh0MC7E8Skfc9P51GIRrSA LQ8bM7v7MoX+OYsSLqv3CZd5UA6UPZK2b3WAYswQ= From: "pinskia at gcc dot gnu.org" 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 16:26:53 +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: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: bug_status resolution 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 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Andrew Pinski --- You need to link with -pie if you want a PIE executable. BUT that does not = work with -elf/-eabi targets as there is no loader. Since there is no loader and shared libraries are not supported with bare metal, you need to have a modified binutils to do the right thing and have a correct target.=