This patch adds support for COFF objects with extended relocation tables to the llvm-objcopy tool.
Details
Diff Detail
Event Timeline
The code looks good to me, but it would be good to have a testcase that actually covers the writing part of the patch. As far as I see, the testcase only checks that we don't error out if the extended relocations flag is set on input, but as the test object doesn't actually have that many relocations, it doesn't invoke that bit of the writer.
One can use gzipped object files (see COFF/bigobj.test for an example) for testcases where one needs a slightly larger test file.
I think using generated object in the test is more preferable since yaml definition can be adjust if there would be a need for that, but it turned out that yaml2obj tool also has problems with COFF’s extended relocation tables. I have prepared a patch to fix this problem in the yaml2obj – D70251
I am going to commit this patch as is now and change it to use generated object once I commit D70251.