[Differential] D51188: dtrace: fix symbol address resolving

From: markj (Mark Johnston) <phabric-noreply_at_FreeBSD.org>
Date: Mon, 07 Jul 2025 14:45:34 UTC
markj added a comment.


  This change looks reasonable to me. I think the problem with st_value = 0 only applies to ET_REL KLDs.

INLINE COMMENTS

> dt_module.c:162
>  
> -		if (sym->st_value != 0 &&
> -		    (ELF64_ST_BIND(sym->st_info) != STB_LOCAL || sym->st_size)) {
> +		if (ELF64_ST_BIND(sym->st_info) != STB_LOCAL || sym->st_size) {
>  			asrsv++; /* reserve space in the address map */

Shouldn't we make the same change in dt_module_sysinit32()?

REPOSITORY
  rG FreeBSD src repository

CHANGES SINCE LAST ACTION
  https://reviews.freebsd.org/D51188/new/

REVISION DETAIL
  https://reviews.freebsd.org/D51188

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: zldrobit_gmail.com, #dtrace, gnn
Cc: markj, avg, freebsd-dtrace-list, imp, me_reviews.freebsd_lelf.lu, kpraveen.lkml_gmail.com, bkidney_briankidney.ca, dnelson_1901_yahoo.com, yan.jurak_gmail.com, bcr, lwhsu, jonathan, pstef