Ping: [PATCH] readelf: Fix readelf -Ds for objects using DT_MIPS_XHASH

Xi Ruoyao xry111@xry111.site
Mon Mar 24 03:35:20 GMT 2025


On Thu, 2025-02-20 at 19:49 +0800, Xi Ruoyao wrote:
> It output nothing because nothing assigns dynamic_info_DT_GNU_HASH:
> dynamic_section_mips_val only does so if we pass -d (instead of just
> -D).
> 
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>

Ping.

> ---
>  binutils/readelf.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index 70d0c533f91..52ba2d3c1c8 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -13089,6 +13089,10 @@ the .dynstr section doesn't match the DT_STRTAB and DT_STRSZ tags\n"));
>  	    }
>  	  break;
>  
> +	case DT_MIPS_XHASH:
> +	  if (do_using_dynamic)
> +	    filedata->dynamic_info_DT_GNU_HASH = entry->d_un.d_val;
> +	  /* Fall through. */
>  	default:
>  	  if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
>  	    filedata->version_info[DT_VERSIONTAGIDX (entry->d_tag)]

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Binutils mailing list