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: Commit: Improve gnu build attribute note merging


On Fri, Oct 25, 2019 at 04:45:22PM +0100, Nick Clifton wrote:
> +static int
> +sort_gnu_build_notes (const void * data1, const void * data2)
> +{
> +  objcopy_internal_note * pnote1 = (objcopy_internal_note *) data1;
> +  objcopy_internal_note * pnote2 = (objcopy_internal_note *) data2;
> +
> +  if (pnote1->note.type != pnote2->note.type)
> +    {
> +      /* Move deleted notes to the end.  */
> +      if (is_deleted_note (pnote1))     /* 1: OFD 2: OFD */
> +	return 1;
> +
> +      /* Move OPEN notes to the start.  */
> +      if (is_open_note (pnote1))	/* 1: OF  2: OFD */
> +	return -1;
> +
> +      if (is_deleted_note (pnote2))	/* 1: F   2: O D */
> +	return 1;

I think you meant to return -1 here.  Fix committed.

-- 
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]