[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #33 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:fa9f40bacbd187996e03f93086fae1ab9052f51b commit r12-5868-gfa9f40bacbd187996e03f93086fae1ab9052f51b Author: Jakub Jelinek Date:

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-09 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #32 from Iain Sandoe --- I guess the first part (fixing with PIE) fixes a regression - but the remainder is an enhancement?

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #31 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:0d5db1dd65b45286082f82f600ca0a3e6e43e06e commit r12-5857-g0d5db1dd65b45286082f82f600ca0a3e6e43e06e Author: Iain Sandoe Date:

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #30 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bf15cd665e74791aae87e7e151a0cf0c4cb54684 commit r12-5856-gbf15cd665e74791aae87e7e151a0cf0c4cb54684 Author: Jakub Jelinek Date:

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #29 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:747380f47da0da6c11fd5262ac428bb53433ea19 commit r12-5855-g747380f47da0da6c11fd5262ac428bb53433ea19 Author: Jakub Jelinek Date:

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #28 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:4dc6d19222581c77a174d44d97507d234fb7e39b commit r12-5802-g4dc6d19222581c77a174d44d97507d234fb7e39b Author: Jakub Jelinek Date:

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-06 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #27 from Iain Sandoe --- (In reply to Jakub Jelinek from comment #26) > Note, the code to emit that relocation table isn't for free, besides that > ~3% growth of the *.gch files it also slows down the PCH generation, e.g. > for

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-06 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #26 from Jakub Jelinek --- Note, the code to emit that relocation table isn't for free, besides that ~3% growth of the *.gch files it also slows down the PCH generation, e.g. for stdc++.h at -O2 -g on my box from ~3.45s to ~4.13s, so

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-06 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Jakub Jelinek changed: What|Removed |Added Attachment #51929|0 |1 is obsolete|

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-06 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Jakub Jelinek changed: What|Removed |Added Attachment #51926|0 |1 is obsolete|

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #22 from Jakub Jelinek --- That is true, but for the common case the relocation table sits in between two parts that need to be used, so in the common case it fseeks over it. I was hoping the relocation table could be last, but that

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-05 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #21 from Iain Sandoe --- I'm not sure that the file size is that critical. IIUC, we never even read the relocation table unless the target returns a different mapped address from the one in the file, and we hope to choose VMA

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #20 from Jakub Jelinek --- Thanks, you've got far further than I ended up with. I'll incorporate your changes tomorrow. And indeed, the PIE relocation code needs to take the bias into account and I even noted I need to do that, but

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-05 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #19 from Iain Sandoe --- (In reply to Iain Sandoe from comment #18) > I needed two small additions to build (c-family+Ada+fortran+lto) > 3. I have one failing ObjC test... > > (possibly a missing or incorrectly specified GTY(()) -

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-05 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #18 from Iain Sandoe --- I needed two small additions to build (c-family+Ada+fortran+lto) ** Go and D not tested. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 93b6eb5bb45..af6b6bd14d4 100644 ---

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-04 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #17 from Jakub Jelinek --- Created attachment 51926 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51926=edit gcc12-pr71934-reloc-wip.patch Completely untested patch to perform PCH relocation. Due to nested_ptr unfortunately

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #16 from Jakub Jelinek --- And if doing it at restore time would be too hard, there is always an option to precompute a "relocation" table during PCH saving and store it at the very end of the PCH file, so that normally when

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #15 from Iain Sandoe --- if it were only the main exe, I think we'd be OK on m32 Darwin too - but after 10.7 everything gets ASLRd (kernel, DSOs, dynamic linker and exe) so even though each one is in a smallish range, the combined

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #14 from Jakub Jelinek --- Making PCH relocatable (as last resort) is doable too, after all, we already relocate it once during PCH storing, all the info is there. We even don't need something like the saving_htab for it, all we need

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #13 from Iain Sandoe --- Have two patches that implement "--enable-pie-tools" to do this as noted they need some polish and I suspect that we need a "PIEflag.m4" modelled in the same way as PICflag.m4 (which covers both enable and

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #11 from Iain Sandoe --- I think this needs to be done selectively (I posted some patches which probably need some polish). We have to remember that (much thought I really appreciates Jakub's work on this) this only solves part of

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #10 from Jakub Jelinek --- For start we could revert the patch that prevents it, I think that was r6-4396-g5148d2e38fa5ff6 + perhaps some follow-ups.

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #9 from H.J. Lu --- Can we enable PIE on gcc now?

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-12-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #8 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:fe7c3ecff1f9c0520090a77fa824d8c5d9dbec12 commit r12-5768-gfe7c3ecff1f9c0520090a77fa824d8c5d9dbec12 Author: Jakub Jelinek Date:

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-09-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #7

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-09-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Iain Sandoe changed: What|Removed |Added CC||iains at gcc dot gnu.org --- Comment #6

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2021-08-28 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2016-07-20 Thread bugdal at aerifal dot cx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Rich Felker changed: What|Removed |Added CC||bugdal at aerifal dot cx --- Comment #4

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2016-07-19 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #3

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2016-07-19 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #2 from Andrew Pinski --- Now having PCH around might not be useful anyways. Someone would have to check to see if anyone uses PCH still.

[Bug pch/71934] pch cannot be disabled so gcc cannot be position independent

2016-07-19 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71934 --- Comment #1 from Andrew Pinski --- Actually you could exactly what is done for darwin targets to get it working on PIE. Also what do you mean by disabled? Do you mean not doing a PCH for libstdc++ (there is already an option for that; can't