This attempts to fix #304.
With this patch, I no longer reproduce the issue using the same large object file that triggered it before.
I've also updated the test code to handle XINDEX for the strtab, however I don't know a good way to generate a test case for an ELF file with >=2^16 sections without embedding a very large blob, so I've left it for future work.
(If I've missed a simple way to do this, happy to do it now)
This attempts to fix #304.
With this patch, I no longer reproduce the issue using the same large object file that triggered it before.
I've also updated the test code to handle XINDEX for the strtab, however I don't know a good way to generate a test case for an ELF file with >=2^16 sections without embedding a very large blob, so I've left it for future work.
(If I've missed a simple way to do this, happy to do it now)