[PATCH 2/2] vdso: Reject absolute relocations during build

Thomas Gleixner tglx at linutronix.de
Wed Apr 30 00:32:27 PDT 2025


On Tue, Apr 29 2025 at 17:17, Jan Stancek wrote:
> On Tue, Apr 29, 2025 at 2:56 PM Thomas Weißschuh
> <thomas.weissschuh at linutronix.de> wrote:
>>
>> +# Also validate that no absolute relocations are present in the object files themselves.
>>  quiet_cmd_vdso_check = VDSOCHK $@
>>        cmd_vdso_check = if $(READELF) -rW $@ | grep -v _NONE | grep -q " R_\w*_"; \
>>                        then (echo >&2 "$@: dynamic relocations are not supported"; \
>> +                            rm -f $@; /bin/false); fi && \
>> +                      if $(READELF) -rW $(filter %.o, $(real-prereqs)) | grep -q " R_\w*_ABS"; \
>> +                      then (echo >&2 "$@: absolute relocations are not supported"; \
>>                              rm -f $@; /bin/false); fi
>
> Should this check only some sections? I'm getting lot of matches on
> debuginfo related sections:

Hmm. All architecture VDSO Makefiles have -fPIC in CFLAGS except for
arm64, which only adds it in arm64/kernel/vdso32/Makefile but not in
arm64/kernel/vdso/Makefile. Confused.

Thanks,

        tglx




More information about the linux-arm-kernel mailing list