SIGBUS si_code 12

Paul FLOYD pjfloyd at wanadoo.fr
Sun May 24 09:24:44 UTC 2020


 
 
 
> > And which files/functions do that?
> ELF image activator.

> Look in kern/imgact_elf.c. It is basically in check_note, used from
> get_brandinfo. The real function names are mangled for co-existence
> of 32 and 64 bit elf activators.

That's quite interesting. If I run procstat -b on a running Valgrind instance I see

 
aulf> procstat -b 2072
PID COMM OSREL PATH
2072 memcheck-amd64-free 0 /usr/home/paulf/scratch/valgrind/memcheck/memcheck-amd64-freebsd

A quick recap of Valgrind execution

'valgrind' itself is just a small stub executable that looks at the guest executable to determine if it is amd64 or x86. It will then do an execve of the required tool e.g., memcheck-amd64-freebsd. 
The tools themselves are entirely standalone and do not link with any libraries, not even libc.

Is there a way to get the linker to add a .note section with osrel?

If not, is there a way to set osrel after a process has started?

A+
Paul





More information about the freebsd-hackers mailing list