diff mbox series

[v2,07/16] powerpc: Skip objtool from running on VDSO files

Message ID 20220829055223.24767-8-sv@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series objtool: Enable and implement --mcount option on powerpc | expand

Commit Message

Sathvika Vasireddy Aug. 29, 2022, 5:52 a.m. UTC
Do not run objtool on VDSO files, by using
OBJECT_FILES_NON_STANDARD

Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
---
 arch/powerpc/kernel/vdso/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Christophe Leroy Aug. 30, 2022, 6:27 a.m. UTC | #1
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> Do not run objtool on VDSO files, by using
> OBJECT_FILES_NON_STANDARD
> 
> Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   arch/powerpc/kernel/vdso/Makefile | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
> index 096b0bf1335f..a49a0d6a1c53 100644
> --- a/arch/powerpc/kernel/vdso/Makefile
> +++ b/arch/powerpc/kernel/vdso/Makefile
> @@ -102,3 +102,5 @@ quiet_cmd_vdso64ld_and_check = VDSO64L $@
>         cmd_vdso64ld_and_check = $(VDSOCC) $(c_flags) $(CC64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) ; $(cmd_vdso_check)
>   quiet_cmd_vdso64as = VDSO64A $@
>         cmd_vdso64as = $(VDSOCC) $(a_flags) $(CC64FLAGS) $(AS64FLAGS) -c -o $@ $<
> +
> +OBJECT_FILES_NON_STANDARD := y
Peter Zijlstra Sept. 1, 2022, 7:19 p.m. UTC | #2
On Mon, Aug 29, 2022 at 11:22:14AM +0530, Sathvika Vasireddy wrote:
> Do not run objtool on VDSO files, by using
> OBJECT_FILES_NON_STANDARD
> 
> Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
> ---
>  arch/powerpc/kernel/vdso/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
> index 096b0bf1335f..a49a0d6a1c53 100644
> --- a/arch/powerpc/kernel/vdso/Makefile
> +++ b/arch/powerpc/kernel/vdso/Makefile
> @@ -102,3 +102,5 @@ quiet_cmd_vdso64ld_and_check = VDSO64L $@
>        cmd_vdso64ld_and_check = $(VDSOCC) $(c_flags) $(CC64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) ; $(cmd_vdso_check)
>  quiet_cmd_vdso64as = VDSO64A $@
>        cmd_vdso64as = $(VDSOCC) $(a_flags) $(CC64FLAGS) $(AS64FLAGS) -c -o $@ $<
> +
> +OBJECT_FILES_NON_STANDARD := y

Just to clarify; your linker script will place the VDSO in .rodata or a
similar !.text section, right?
Michael Ellerman Sept. 2, 2022, 7:40 a.m. UTC | #3
Peter Zijlstra <peterz@infradead.org> writes:
> On Mon, Aug 29, 2022 at 11:22:14AM +0530, Sathvika Vasireddy wrote:
>> Do not run objtool on VDSO files, by using
>> OBJECT_FILES_NON_STANDARD
>> 
>> Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
>> ---
>>  arch/powerpc/kernel/vdso/Makefile | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
>> index 096b0bf1335f..a49a0d6a1c53 100644
>> --- a/arch/powerpc/kernel/vdso/Makefile
>> +++ b/arch/powerpc/kernel/vdso/Makefile
>> @@ -102,3 +102,5 @@ quiet_cmd_vdso64ld_and_check = VDSO64L $@
>>        cmd_vdso64ld_and_check = $(VDSOCC) $(c_flags) $(CC64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) ; $(cmd_vdso_check)
>>  quiet_cmd_vdso64as = VDSO64A $@
>>        cmd_vdso64as = $(VDSOCC) $(a_flags) $(CC64FLAGS) $(AS64FLAGS) -c -o $@ $<
>> +
>> +OBJECT_FILES_NON_STANDARD := y
>
> Just to clarify; your linker script will place the VDSO in .rodata or a
> similar !.text section, right?

Not the linker script, but we incbin it into .data.

See arch/powerpc/kernel/vdso64_wrapper.S

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
index 096b0bf1335f..a49a0d6a1c53 100644
--- a/arch/powerpc/kernel/vdso/Makefile
+++ b/arch/powerpc/kernel/vdso/Makefile
@@ -102,3 +102,5 @@  quiet_cmd_vdso64ld_and_check = VDSO64L $@
       cmd_vdso64ld_and_check = $(VDSOCC) $(c_flags) $(CC64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) ; $(cmd_vdso_check)
 quiet_cmd_vdso64as = VDSO64A $@
       cmd_vdso64as = $(VDSOCC) $(a_flags) $(CC64FLAGS) $(AS64FLAGS) -c -o $@ $<
+
+OBJECT_FILES_NON_STANDARD := y