Re: git: 4617a6cb82a6 - main - nlist: Handle multiple symbol tables
- In reply to: John Baldwin : "Re: git: 4617a6cb82a6 - main - nlist: Handle multiple symbol tables"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 29 Aug 2026 17:37:35 UTC
On Sat, Aug 29, 2026 at 01:07:44PM -0400, John Baldwin wrote: > On 8/28/26 14:30, Dag-Erling Smørgrav wrote: > > John Baldwin <jhb@FreeBSD.org> writes: > > > The _Foo vs Foo change broke many uses of kvm_nlist in the tree. In > > > particular, ktrdump no longer works on crashdumps now, and I finally > > > single-stepped through it today to figure out why. > > > > > > A quick grep shows me all these places that are now broken: > > > [...] > > > Would you rather revert the underscore change or fix all these? > > > > Looks to me like they were all incorrect to begin with and only worked > > because of the hack in nlist(), so I would vote for fixing the calls. > > But perhaps kib@ should weigh in since he was the one who suggested > > dropping the hack. > > > > Cc: to re@ as this is a regression in 14.5. > > I think a.out required the leading underscore, so when many of these > were originally added they were in fact correct, and the hack was > required to allow libkvm to work across both a.out and ELF. It may > very well be that we no longer care about a.out, but this should be > an intentional decision if so. It is (almost) an ABI change in the > sense that it changes the original API contract. Yes I am sure that this was a transitional measure to allow the same code to uniformly handle both a.out (with underscores) and ELF (without) names. But in the ELF times, the mis-feature does not allow to distinguish symbol and _symbol. It can be considered an ABI change, but IMO the behavior is too confusing to be useful for anything except the wrong code, as des noted.