From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A3593858D20; Wed, 8 Feb 2023 23:01:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A3593858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675897280; bh=H6pky1dIWm753lAazy5P5EeX6WRMFe0mlx4MCcfIQc4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bBRFMmxsnoybI5R0MUPbtxkQ9LP/3EFXhwVndLYGHG0tk1xd5X8kvDdquZaL529dz zIio5xJAhxGjrh4b4vLC/BZM5D0Ol46Vum/+NyR7a8Az/4zP/6H+ph310wbwGmNMT5 cQ6ICi+tWnc7kUyHnMVCa+cleA9c7qdOIlGsE2KU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug pch/108732] Pre-compiled headers cannot be output to /dev/null Date: Wed, 08 Feb 2023 23:01:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: pch X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: 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=3D108732 --- Comment #6 from Andrew Pinski --- (In reply to Matt Hellige from comment #5) > That makes sense, but it's just a strange inconsistency from a usability > point of view. >=20 > .so files are generally mmapped as well, I believe, aren't they? But I can > still generate one to /dev/null if I like: >=20 > $ gcc12.2.0 -o /dev/null -rdynamic -shared foo.o bar.o -lrt ... >=20 > Works fine. Well so works differently because the linker produces runtime relocations f= or some segments of the shared objects which get applied at runtime. This is unlike pch which does have a relocation method but that method is slow. Also the linker is basically doing copies from other files into the final file w= hile gcc is outputting its internals out for pch.=