https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108732

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Matt Hellige from comment #5)
> That makes sense, but it's just a strange inconsistency from a usability
> point of view.
> 
> .so files are generally mmapped as well, I believe, aren't they? But I can
> still generate one to /dev/null if I like:
> 
>    $ gcc12.2.0 -o /dev/null -rdynamic -shared foo.o bar.o -lrt ...
> 
> Works fine.

Well so works differently because the linker produces runtime relocations for
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 while
gcc is outputting its internals out for pch.

Reply via email to