# Re: \[PATCH 00/14\] scripts/sorttable: ftrace: Remove place holders for weak functions in available\_filter\_functions

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2025-01-02 21:43:40 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/01/2875532
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/01/2875388/t.md

```text
On Thu, 2 Jan 2025 11:30:12 -0800
Linus Torvalds [ref] wrote:

> Please just do this by sorting non-existent functions at the end,
> instead of just zeroing them out.
> 
> That makes the mcount_loc table dense in valid entries. We could then
> just rewrite the size of the table (or just add a variable containing
> the size, if you don't want to change ELF metadata - but you're
> already sorting the table, so why not?)

Well, I tried to move the __start_mcount_loc, but it appears that changing
the symbol value *after* the linking phase does nothing :-p  The references
to it have already been resolved. The Elf_Rel* will do the updates from
then on, and to read those, becomes architecture dependent.

I guess the next thing I could do is to create a "skip" variable that can
be modified, and we can skip X entries in the start_mcount_loc. As the
start_mcount_loc and stop_mcount_loc (which determines the size of the
table) cannot be modified in an architecture independent way.

-- Steve
```
