https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273956

--- Comment #8 from Paul Floyd <pjfl...@wanadoo.fr> ---
(In reply to Ed Maste from comment #6)

I know a thing or two about this.

Initially Valgrind would only trigger reading debuginfo when it considered a
file to have finished mapping. That used to mean seeing 1 RX and 1 RW section.
Then lld 9 started writing 2 RW sections. Gory details here:
https://bugs.kde.org/show_bug.cgi?id=452802

So now Valgrind takes a peak at the binary to count the RW PT_LOADs and then
triggers the debuginfo when it has seen 1 RW and the right number of RW
PT_LOADs.

Pretty much all binaries on FreeBSD now have 1 RC and 2 RW. For instance 

readelf -l /bin/sleep

RO    02     .interp .note.tag .dynsym .gnu.version .gnu.version_r .gnu.hash
.hash .dynstr .rela.dyn .rela.plt .rodata .eh_frame_hdr .eh_frame 
RX    03     .text .init .fini .plt 
RW1   04     .ctors .dtors .jcr .init_array .dynamic .got 
RW2   05     .data .got.plt .bss 

(I added the 1st column)

The valgrind tools are totally static so they son't have any segments like got
plt 


readelf -l .in_place/memcheck-amd64-freebsd

RO   01     .note.tag .rodata .eh_frame_hdr .eh_frame 
RX   02     .text 
RW1   03     .data .bss

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to