bfd_vma start;
bfd_vma end;
} objcopy_internal_note;
-
+
#define DEBUG_MERGE 0
#if DEBUG_MERGE
pnote1->note.namesz - 3 : pnote2->note.namesz - 3);
if (cmp)
return cmp;
-
+
if (pnote1->end < pnote2->start)
return -1;
if (pnote1->start > pnote2->end)
return -1;
if (pnote1->end > pnote2->end)
return 1;
-
+ if (pnote1->end < pnote2->end)
+ return -1;
+
/* Put OPEN notes before function notes. */
if (is_open_note (pnote1) && ! is_open_note (pnote2))
return -1;
if (! is_open_note (pnote1) && is_open_note (pnote2))
return 1;
-
+
return 0;
}
return 1; /* 1: F 2: O */
}
-
+
/* Sort by starting address. */
if (pnote1->start < pnote2->start)
return -1;
&& pnote2->note.namesz > 4
&& pnote1->note.namedata[3] != pnote2->note.namedata[3])
return pnote1->note.namedata[3] - pnote2->note.namedata[3];
-
+
return 0;
}
goto done;
}
}
-
+
/* Make a copy of the notes and convert to our internal format.
Minimum size of a note is 12 bytes. Also locate the version
notes and check them. */
address. */
end = (bfd_vma) -1;
break;
-
+
case 8:
if (! is_64bit (abfd))
{
start = bfd_get_64 (abfd, pnote->note.descdata);
end = bfd_get_64 (abfd, pnote->note.descdata + 8);
break;
-
+
default:
err = _("corrupt GNU build attribute note: bad description size");
goto done;
|| memcmp (back->note.namedata,
pnote->note.namedata, pnote->note.namesz) != 0)
break;
-
+
if (back->start == pnote->start
&& back->end == pnote->end)
{
if (! is_deleted_note (pnote))
merge_debug ("Unable to do anything with note at %#08lx\n",
(pnote->note.namedata - (char *) contents) - 12);
-#endif
+#endif
}
/* Resort the notes. */
pnote->note.namesz
);
#endif
-
+
new_size = new - new_contents;
if (new_size < size)
{
alignment = p->alignment;
else
alignment = bfd_section_alignment (isection);
-
+
/* FIXME: This is probably not enough. If we change the LMA we
may have to recompute the header for the file as well. */
if (!bfd_set_section_alignment (osection, alignment))
s = strchr (optarg, '=');
if (s == NULL)
fatal (_("bad format for --set-section-alignment: argument needed"));
-
+
align = atoi (s + 1);
if (align <= 0)
fatal (_("bad format for --set-section-alignment: numeric argument needed"));
align >>= 1;
++palign;
}
-
+
if (align != 1)
/* Number has more than on 1, i.e. wasn't a power of 2. */
fatal (_("bad format for --set-section-alignment: alignment is not a power of two"));
p->alignment = palign;
}
break;
-
+
case OPTION_RENAME_SECTION:
{
flagword flags;