Commit: Improve gnu build attribute note merging

Alan Modra amodra@gmail.com
Sat Oct 26 02:42:00 GMT 2019


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



More information about the Binutils mailing list