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: [Patch] Add --identify option to dlltool


> I guess there are two choices:
> 
> 1) ignore it. Only return "the first" .idata$7 entry.
> 
> 2) return all entries (one per line?). In this case, a client (such as
> libtool) could detect a multi-line result and flag an error, or
> otherwise handle that exceptional case.
> 
> The downside of 2) is that in the VAST majority of cases, there is only
> one archive member that has the non-empty .idata$7 section -- and it is
> first. So, --identify usually quits after parsing only the very first
> archive member; it hunts only until it finds the (one, e.g. first, e.g
> only) answer. Option (2) would require parsing *every* archive member
> from beginning to end. That's a pretty severe pessimism to handle a case
> that is rather pathological in nature.

IMHO case 1) is that one to choose. Maybe it would be even better to check 
if there is just one .idata$7 section present, and if not to reject it at 
all. The example I made is for *nix an absolute none-issue, I agree. For 
coff targets it is possible but odd and shouldn't be supported at all, but 
should be warned.

Cheers
Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]