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] |
2010/9/14 Richard Henderson <rth@redhat.com>: > On 09/14/2010 10:18 AM, Kai Tietz wrote: >> + ? ? ? ? && pfinfo->contents != NULL) > > This is already checked by cofflink.c here: > >> ? if ((finfo.internal_syms == NULL && max_sym_count > 0) >> ? ? ? || (finfo.sec_ptrs == NULL && max_sym_count > 0) >> ? ? ? || (finfo.sym_indices == NULL && max_sym_count > 0) >> ? ? ? || finfo.outsyms == NULL >> ? ? ? || (finfo.linenos == NULL && max_lineno_count > 0) >> ? ? ? || (finfo.contents == NULL && max_contents_size > 0) >> ? ? ? || (finfo.external_relocs == NULL && max_reloc_count > 0) >> ? ? ? || (! info->relocatable >> ? ? ? ? ? && finfo.internal_relocs == NULL >> ? ? ? ? ? && max_reloc_count > 0)) >> ? ? goto error_return; > > So delete that condition. > >> + ?bfd_vma vl, vr; >> + ?vl = bfd_getl32 (lp); vr = bfd_getl32 (rp); >> + ?if (vl != vr) >> + ? ?return (vl < vr ? -1 : 1); >> + ?vl = bfd_getl32 (lp + 4); vr = bfd_getl32 (rp + 4); >> + ?if (vl != vr) >> + ? ?return (vl < vr ? -1 : 1); >> + ?vl = bfd_getl32 (lp + 8); vr = bfd_getl32 (rp + 8); >> + ?if (vl != vr) >> + ? ?return (vl < vr ? -1 : 1); >> + ?return 0; > > Isn't the start address the only thing that matters here? > We really shouldn't have overlapping entries. ?Certainly > the pointer into the .xdata section should not be included > in the sort order; that's totally irrelevant. Well, I just did the complete comparison here. Other possible thing here would be an abort, if we see to entries with same begin_address, I would assume it could be unnecessary (and maybe we should even abort if end-address/handler-data aren't equal, but start address is equal), but I am not sure if SEH would allow here different handler-types for same region, and so sorting could be still required. Regards, Kai -- |? (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination
Attachment:
sort_pdata.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |