[PATCH] Save/restore file offset while reading notes in core file

Martin Liška mliska@suse.cz
Wed Mar 31 10:45:31 GMT 2021


On 3/26/21 6:48 PM, Keith Seitz via Binutils wrote:
> On 3/18/21 9:22 PM, Alan Modra wrote:
>> On Thu, Mar 18, 2021 at 08:40:26AM -0700, Keith Seitz via Binutils wrote:
>>> 	* elfcore.h (_bfd_elf_core_find_build_id): Save and restore
>>> 	file offset when calling elf_read_notes.
>>
>> Looks OK to me, but you could avoid the ftell with
>>
>> 	  /* Make sure ABFD returns to processing the program headers.  */
>> 	  if (bfd_seek (abfd, (file_ptr) (offset + i_ehdr.e_phoff
>> 					  + (i + 1) * sizeof (x_phdr)),
>> 			SEEK_SET) != 0)
>> 	    goto fail;
>>
>> Either way is fine.
>>
> 
> After seeing all the hoops that tell can jump through, I've decided
> to run with your suggestion, and I've pushed this change.

Hello.

May I ask: has the patch been pushed? I can't see it in binutils master.

Thanks,
Martin

> 
> Thank you for taking a look!
> 
> Keith
> 



More information about the Binutils mailing list