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

Thomas Weißschuh <g...@t-8ch.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |FIXED

--- Comment #4 from Thomas Weißschuh <g...@t-8ch.de> ---
(In reply to Andrew Pinski from comment #3)
> .LC0:
>         .xword  hidden_symbol+65537
> 
> Is still valid for all shared libraries.
>
> The problem is you want a DSO with no dynamic relocations but that won't
> work here.

Is there another way to prevent GCC from emitting absolute relocations?
Similar to how this code works with clang or -mcmodel=small?

> If you want that you should do the similar thing as what the 32bit compat
> does for a similar reasons.

This is what I am doing for now:
https://lore.kernel.org/lkml/20250429-vdso-absolute-reloc-v1-1-987a0afd1...@linutronix.de/
Unfortunately this only fixes one single location. New ones may crop up at any
time.

It doesn't seem to me that the reasons are similar.
The compat code does it for efficiency while the non-compat code now needs it
for correctness.

If this behavior is expected then it could also affect all other architectures,
no?

Reply via email to