[PATCH] D42516: [llvm-objcopy] Add support for large indexes

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 22:10:45 PST 2018

jakehehrlich added a comment.

> 1. Make sure section index table is removed when not needed
> 2. Make sure section index table is added when it is needed
> 3. Check error for binary output
> 4. Check initialization errors for section index table
> 5. To the existing test add checks for the appropriate fields for section index table
> 6. Check error for case when symbol has SHN_XINDEX index but no section index table exists

So these tests are hard to fulfill. 1. is done. 2. isn't possible because there is no way to a) add a symbol to a section or b) add a section before another section. As soon as symbols can be added or section position can be edited this will need to be tested. 3. isn't possible because there isn't really a way (short of using dd to make a binary modification) to make the section header table allocated. Also eventually dynamic section header tables will need to be supported and such a test will become impossible until section editing becomes a thing because allocated section header tables will be treated the way dynamic sections will be.  Checking the initialization error also requires binary editing the link of the section index table (Again once we can edit sections, that will be a proper test). I added the extra checks for the section header index fields. It's not an ideal test but to test that

So unless you have other test ideas I think these tests are the best I can do. They're better than a basic smoke test but they're not 100% complete.



More information about the llvm-commits mailing list