This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH-RFC 1/1] readelf: Don't warn on non-zero sh_info for PROGBITS


On Fri, Jul 06, 2018 at 12:47:29PM +0200, Francois H. Theron wrote:
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index 1b50ba7631..30572584a6 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -6366,7 +6366,8 @@ process_section_headers (Filedata * filedata)
>  
>  	default:
>  	  /* FIXME: Add support for target specific section types.  */
> -	  if (section->sh_type == SHT_NOBITS)
> +	  if (section->sh_type == SHT_NOBITS ||
> +	      section->sh_type == SHT_PROGBITS)
>  	    /* NOBITS section headers with non-zero sh_info fields can be
>  	       created when a binary is stripped of everything but its debug
>  	       information.  The stripped sections have their headers

I think you should do as the comment says, and implement target
specific support.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]