Richard Biener <richard.guent...@gmail.com> writes:

  Yes, this should work.  It probably has a slightly higher chance of
  mismatching the start/end patterns elsewhere in the file, but well...

Thanks for checking my proposed patch!

Yes, I realise that we could get unlucky now, something which really
shouldn't happen with just the object file.  It's not neat, but it
should work.

A solution would be to make before[] and after[] huge enough that their
combined sizes are sure to be greater than 1/2 a plain executable.  Then
there is simply no space for a false match.  But as configure cannot
know the size of a plain executable, one would need to loop over
gradually larger before/after until

  2 * (sizeof(before)+sizeof(after)) > wc -c conftest

hold true.  :-)

-- 
Torbjörn
Please encrypt, key id 0xC8601622
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to