# Re: \[PATCH v5 2/6\] scripts/sorttable: Have mcount rela sort use direct values

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2025-02-24 22:21:14 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/02/2941938
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/02/2932386/t.md

```text
On Mon, 24 Feb 2025 22:10:53 +0100
"Arnd Bergmann" [ref] wrote:

> This is what I get on arm64 randconfig builds using clang after your
> patch:
> 
>   failed to sort mcount 'Expected 24260 mcount elements but found 0
>   ': vmlinux
>   Failed to sort kernel tables
> 
> I have not tried to understand what your patch does. See the attached
> defconfig for a reproducer.

Hmm, I haven't tried building this with clang.

Can you compile without that commit, run and give me the output from these
two programs:

 ./dump_elf_sym vmlinux __start_mcount_loc __stop_mcount_loc
 ./dump_elf_rela vmlinux .rela.dyn

If the second one fails, remove the '.rela.dyn' and see what that shows.

 https://rostedt.org/code/dump_elf_sym.c
 https://rostedt.org/code/dump_elf_rela.c


Thanks,

-- Steve
```
