Re: [patch] Fix separate-debug with non-unique section names (PR 11409)

Daniel Jacobowitz
2010-03-24T20:18:40Z

On Wed, Mar 24, 2010 at 09:09:43PM +0100, Jan Kratochvil wrote:
> While the algorithm could be much more clever - if we ever need to resync at
> the point of non-unique section names the files are too different it makes no
> sence to try to match them by addr_info_make_relative at all.

What if we assume that in a valid separate debug file, the only
sections that will be different will have been totally stripped from
either the before or after file?

IOW:

i = 0 // index in main file
j = 0 // index in separate file
for each section in main file:
if (section names match)
good
else if (section i's name is not present in separate file)
i++, continue
else if (section j's name is not present in separate file)
j++, continue
else
complain that the two files do not match

?

--
Daniel Jacobowitz
CodeSourcery