Page MenuHomePhabricator

jhenderson (James Henderson)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 18 2017, 2:49 AM (230 w, 5 d)

Recent Activity

Today

jhenderson added a comment to D95339: [RFC][test] Adapt debug-info lit framework for more general purposes - part 1.

The rest of the patches in this series have been approved. It's just this patch that needs looking at. There's no particular need to look at most of the files that were in the debuginfo-test folder, as they've simply been moved. I'd recommend reviewing the changes outside that folder, plus the CMake files.

Mon, Jun 21, 2:09 AM · Restricted Project
jhenderson added a comment to D104613: [llvm-readobj][XCOFF] Add support for printing the String Table..

Please add the new option to the llvm-readobj documentation.

Mon, Jun 21, 1:20 AM · Restricted Project
jhenderson added inline comments to D104080: [LLD][LLVM] CG Graph profile using relocations.
Mon, Jun 21, 1:09 AM · Restricted Project
jhenderson added inline comments to D104271: llvm-dwarfdump: Print warnings on invalid DWARF.
Mon, Jun 21, 12:46 AM · Restricted Project

Fri, Jun 18

jhenderson added a comment to D104271: llvm-dwarfdump: Print warnings on invalid DWARF.

Not had time to review the test cases yet, but will do that next week.

Fri, Jun 18, 1:00 AM · Restricted Project
jhenderson added inline comments to D104483: Improve error handling in llvm-dwarfdump.
Fri, Jun 18, 12:16 AM · Restricted Project
jhenderson added inline comments to D104483: Improve error handling in llvm-dwarfdump.
Fri, Jun 18, 12:16 AM · Restricted Project

Thu, Jun 17

jhenderson added a comment to D104363: [llvm] Mark more internal command line optins as cl::Hidden.

This isn't an issue for the static linking approach, so why does it happen for the dynamic library approach? It seems like fixing this aspect should be the way forward, as it will be more robust generally.

Thu, Jun 17, 1:11 AM · Restricted Project
jhenderson added inline comments to D104080: [LLD][LLVM] CG Graph profile using relocations.
Thu, Jun 17, 12:16 AM · Restricted Project
jhenderson added a comment to D103490: [SystemZ][z/OS] Add support for TXT records in the GOFF reader.

Okay, no more comments from me at this time. Someone with GOFF knowledge needs to review the functionality for correctness.

Thu, Jun 17, 12:07 AM · Restricted Project

Wed, Jun 16

jhenderson committed rGb9ce8ea4542f: [obj2yaml] Address D104035 review comments (authored by jhenderson).
[obj2yaml] Address D104035 review comments
Wed, Jun 16, 7:02 AM
jhenderson accepted D104128: [llvm-symbolizer][docs] Update example for --verbose in the guide.

I take it the new output is just what the head of LLVM produces when rerunning the examples? If so, LGTM.

Wed, Jun 16, 2:59 AM · Restricted Project
jhenderson committed rG5c1639fe064b: [yaml2obj][obj2yaml] Support custom ELF section header string table name (authored by jhenderson).
[yaml2obj][obj2yaml] Support custom ELF section header string table name
Wed, Jun 16, 2:03 AM
jhenderson committed rGfef3bfb1b23a: [yaml2obj] Fix bug when referencing items in SectionHeaderTable (authored by jhenderson).
[yaml2obj] Fix bug when referencing items in SectionHeaderTable
Wed, Jun 16, 2:02 AM
jhenderson closed D104035: [yaml2obj][obj2yaml] Support custom ELF section header string table name.
Wed, Jun 16, 2:02 AM · Restricted Project
jhenderson closed D104098: [yaml2obj] Fix bug when referencing items in SectionHeaderTable.
Wed, Jun 16, 2:02 AM · Restricted Project
jhenderson added a comment to D104080: [LLD][LLVM] CG Graph profile using relocations.

Are call graph sections expected in fully linked output?

Wed, Jun 16, 1:05 AM · Restricted Project
jhenderson accepted D104186: [llvm-objcopy] Make ihex writer similar to binary writer.

LGTM.

Wed, Jun 16, 12:27 AM · Restricted Project
jhenderson added a comment to rG02c718301b30: llvm-objcopy: fix section size truncation/extension when dumping sections.

In other places, we've tested large obejcts by using a compressed input, and then extracted it at test time, although the examples I see are only a few megabytes in size, rather than gigabytes. I'm not convinced we want such such a large object lying around, so looks good to me.

Wed, Jun 16, 12:27 AM
jhenderson added inline comments to D103490: [SystemZ][z/OS] Add support for TXT records in the GOFF reader.
Wed, Jun 16, 12:17 AM · Restricted Project

Tue, Jun 15

jhenderson added inline comments to D103490: [SystemZ][z/OS] Add support for TXT records in the GOFF reader.
Tue, Jun 15, 1:24 AM · Restricted Project
jhenderson added inline comments to D103696: [XCOFF][AIX] Add support for XCOFF 64 bit Object files.
Tue, Jun 15, 1:10 AM · Restricted Project
jhenderson accepted D103455: [yaml2obj] Add support for writing the long symbol name..

LGTM too. Please remember to update the test once the string table printing has landed.

Tue, Jun 15, 12:31 AM · Restricted Project
jhenderson added inline comments to D104271: llvm-dwarfdump: Print warnings on invalid DWARF.
Tue, Jun 15, 12:00 AM · Restricted Project

Mon, Jun 14

jhenderson resigned from D104088: Add clang frontend flags for MIP.
Mon, Jun 14, 11:50 PM · Restricted Project, Restricted Project
jhenderson added a comment to D95339: [RFC][test] Adapt debug-info lit framework for more general purposes - part 1.

Ping #4!

Mon, Jun 14, 3:01 AM · Restricted Project
jhenderson added a comment to D104186: [llvm-objcopy] Make ihex writer similar to binary writer.

Just trying to follow the logic through. I think there is a potential behaviour change, which may be fine, but I just want to highlight it to see what others think (I have no use for IHEX myself, so don't feel like I can make a completely fair judgment either way). If I follow it correctly, if a writable section were not in a PT_LOAD segment, then previously it was skipped, if there was at least one writable section that was in such a segment, whereas now it won't be skipped. This is probably harmless (all such sections should have been placed in a segment anyway). Assuming I'm right, should we have a test-case to illustrate this behaviour change?

Mon, Jun 14, 2:22 AM · Restricted Project

Fri, Jun 11

jhenderson accepted D104114: [llvm-symbolizer] improve test and fix doc example after recent --print-source-context-lines behaviour change.

Maybe -C/-A/-B are available to match grep because the current option is quite long?

Fri, Jun 11, 6:10 AM · Restricted Project
jhenderson updated the diff for D104035: [yaml2obj][obj2yaml] Support custom ELF section header string table name.

Fix missed clang-format issue, and unchecked Exception (caused by broken check).

Fri, Jun 11, 2:24 AM · Restricted Project
jhenderson requested review of D104098: [yaml2obj] Fix bug when referencing items in SectionHeaderTable.
Fri, Jun 11, 1:50 AM · Restricted Project
jhenderson accepted D104092: [llvm-objcopy][MachO] Keep symbols having the flag REFERENCED_DYNAMICALLY set.

LGTM, with nit.

Fri, Jun 11, 12:57 AM · Restricted Project
jhenderson added a comment to D104080: [LLD][LLVM] CG Graph profile using relocations.

The size went up from 107KB to 322KB, aggregate of all the input sections.

Fri, Jun 11, 12:22 AM · Restricted Project
jhenderson added inline comments to D104088: Add clang frontend flags for MIP.
Fri, Jun 11, 12:12 AM · Restricted Project, Restricted Project
jhenderson accepted D101332: [llvm-objcopy] Exclude empty sections in IHexWriter output.

LGTM. I'm not in a good position to push this myself right now, due to some other pending work. @evgeny777/@MaskRay (or anybody else), could you push this for @mciantyre, please?

Fri, Jun 11, 12:10 AM · Restricted Project

Thu, Jun 10

jhenderson requested review of D104035: [yaml2obj][obj2yaml] Support custom ELF section header string table name.
Thu, Jun 10, 7:48 AM · Restricted Project
jhenderson added inline comments to D103974: [llvm-objdump] Add testing for --print-imm-hex, --headers, --section-headers and --private-headers.
Thu, Jun 10, 12:25 AM · Restricted Project
jhenderson accepted D103915: [docs][llvm-ar] Add rsp-quoting option to the llvm-ar command guide..
Thu, Jun 10, 12:05 AM · Restricted Project

Wed, Jun 9

jhenderson added inline comments to D100375: [yaml2obj] Enable support for parsing 64-bit XCOFF..
Wed, Jun 9, 1:54 AM · Restricted Project
jhenderson added a comment to D103490: [SystemZ][z/OS] Add support for TXT records in the GOFF reader.

ping :)

Wed, Jun 9, 1:13 AM · Restricted Project
jhenderson added inline comments to D100375: [yaml2obj] Enable support for parsing 64-bit XCOFF..
Wed, Jun 9, 12:37 AM · Restricted Project
jhenderson added inline comments to D98003: [obj2yaml] Implement parsing sections and auxiliary entries of XCOFF..
Wed, Jun 9, 12:25 AM · Restricted Project
jhenderson added a comment to D103455: [yaml2obj] Add support for writing the long symbol name..

Addressed comments except dumping the raw string table.
It seems llvm-readobj can't dump the raw string table for XCOFF, I have to find another tool to do this.

Wed, Jun 9, 12:13 AM · Restricted Project
jhenderson added inline comments to D103146: [NFC][XCOFF] Use yaml2obj in llvm-objdump/XCOFF/section-headers.test instead of binary files..
Wed, Jun 9, 12:00 AM · Restricted Project

Tue, Jun 8

jhenderson accepted D103915: [docs][llvm-ar] Add rsp-quoting option to the llvm-ar command guide..
Tue, Jun 8, 11:52 PM · Restricted Project
jhenderson added inline comments to D64827: [Xtensa 2/10] Add Xtensa ELF definitions..
Tue, Jun 8, 5:53 AM · Restricted Project
jhenderson added a comment to D95339: [RFC][test] Adapt debug-info lit framework for more general purposes - part 1.

Ping!!

Tue, Jun 8, 3:07 AM · Restricted Project
jhenderson added a comment to D103696: [XCOFF][AIX] Add support for XCOFF 64 bit Object files.

Lots of stylistic comments from me. Someone else will need to review functionality.

Tue, Jun 8, 1:00 AM · Restricted Project

Mon, Jun 7

jhenderson added a comment to D102973: [ELF] Suppress GRP_COMDAT deduplication if the signature symbol is STB_LOCAL.

Test suggestion looks reasonable to me, although I might suggest one slight tweak, namely to use --implicit-check-not rather than CEHCK-NOT after the symbol check. In the latter case, there's nothing stopping the symbol appearing before the set that you are checking.

Mon, Jun 7, 11:54 PM · Restricted Project
jhenderson accepted D103804: [test] Use host platform specific error message substitution.

LGTM. It looks like there are non-standard line endings in this file - please fix them up whislt your're at it (either in the same or another commit).

Mon, Jun 7, 5:40 AM · Restricted Project
jhenderson accepted D102296: [ELF] getRelocatedSection: remove the check for ET_REL object file.

LGTM too. I've got a lot else on my plate, so if @dblaikie or @MaskRay are able to land this, that's preferable. Otherwise, I'll try to do so in the next couple of days.

Mon, Jun 7, 2:38 AM · Restricted Project
jhenderson added a comment to D103546: Added ELFObjectFileBase::checkMagic() for checking ELF magic word..

We have lib/BinaryFormat/Magic.cpp. Do we need the ELF specific API?

Thanks! I was not aware of this code. How about adding something like static inline is_any_elf(file_magic) method in Magic.h? If you agree, then I will abandon this change-set and add the new method in D103545.

Mon, Jun 7, 2:24 AM · Restricted Project
jhenderson added a comment to D103502: Bug 41152 - [DebugInfo] Better dumping of empty location expression .

Mostly looks good to me, but would be nice if one of the earlier reviewers gives thumbs up before we commit this patch.

Mon, Jun 7, 2:11 AM · debug-info, Restricted Project
jhenderson added inline comments to D103455: [yaml2obj] Add support for writing the long symbol name..
Mon, Jun 7, 2:00 AM · Restricted Project
jhenderson added a comment to D103435: [PoC][RISCV] Define a symbol flags and a dynamic tag to avoid lazy binding for vector calls..

Could you please split this patch into a patch that adds the new enum values, which would include the llvm-readobj and yaml2obj/obj2yaml changes, and then another patch (or patches) with the rest in? The latter builds on the former, but the former doesn't need the latter to work.

Mon, Jun 7, 1:48 AM · Restricted Project
jhenderson added inline comments to D98003: [obj2yaml] Implement parsing sections and auxiliary entries of XCOFF..
Mon, Jun 7, 1:43 AM · Restricted Project
jhenderson accepted D85774: [XCOFF][AIX] Enable tooling support for 64 bit symbol table parsing.

Looks good again. Sorry for the delay - I was off work last week.

Mon, Jun 7, 1:22 AM · Restricted Project
jhenderson added a comment to D101332: [llvm-objcopy] Exclude empty sections in IHexWriter output.

Sorry for the delay - I was off work last week. Some minor comments, otherwise basically this is good.

Mon, Jun 7, 1:18 AM · Restricted Project

Sat, May 29

jhenderson added a comment to D103156: [lit] Fix testing of standalone clang and lld builds.

@jhenderson @thopre it works for me now! Thank you!

Sat, May 29, 12:11 AM · Restricted Project

Fri, May 28

jhenderson added a comment to D103156: [lit] Fix testing of standalone clang and lld builds.

@kwk, could you try again please with the latest version of the patch? The code now looks at the same paths as are added to the PATH environment variable, so it should work.

Fri, May 28, 4:11 AM · Restricted Project
jhenderson updated the diff for D103156: [lit] Fix testing of standalone clang and lld builds.

Use the right set of paths in use_clang. This should fix the issue. If it doesn't I'll need someone who can reproduce to dig more into why it doesn't.

Fri, May 28, 4:10 AM · Restricted Project
jhenderson added a comment to D103156: [lit] Fix testing of standalone clang and lld builds.

Ah, I see I missed that paths is reused in use_clang, before the call to use_llvm_tool. I'll fix that now.

Fri, May 28, 4:05 AM · Restricted Project
jhenderson updated the diff for D103156: [lit] Fix testing of standalone clang and lld builds.

Rebase. I'll try landing this once the pre-merge checks complete, if there are no objections.

Fri, May 28, 2:51 AM · Restricted Project
jhenderson accepted D98437: [SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END records.

LGTM, with one spelling error. Thanks!

Fri, May 28, 12:39 AM · Restricted Project
jhenderson accepted D103260: [llvm-objcopy][NFC] Refactor CopyConfig structure - remove lazy options processing..

LGTM overall. Just a few nits.

Fri, May 28, 12:36 AM · Restricted Project
jhenderson added inline comments to D103250: [llvm-dwarfdump][test] Add missing dedicated tests for some options.
Fri, May 28, 12:26 AM · Restricted Project
jhenderson accepted D102900: [llvm-readobj] Print function names with `--bb-addr-map`..

LGTM, thanks!

Fri, May 28, 12:25 AM · Restricted Project

Thu, May 27

jhenderson committed rG2ae58431873d: [lit][test] Improve testing of use_llvm_tool (authored by jhenderson).
[lit][test] Improve testing of use_llvm_tool
Thu, May 27, 3:31 AM
jhenderson closed D103154: [lit][test] Improve testing of use_llvm_tool.
Thu, May 27, 3:31 AM · Restricted Project
jhenderson added a comment to D103154: [lit][test] Improve testing of use_llvm_tool.

Remove unrelated changes.

I'm still investigating the cause of the test failure - it doesn't fail for me locally on my windows machine.

Thu, May 27, 3:01 AM · Restricted Project
jhenderson updated the diff for D103154: [lit][test] Improve testing of use_llvm_tool.

Remove unrelated changes.

Thu, May 27, 1:37 AM · Restricted Project
jhenderson updated the diff for D103156: [lit] Fix testing of standalone clang and lld builds.

Upload correct patch.

Thu, May 27, 1:34 AM · Restricted Project
jhenderson updated the diff for D103156: [lit] Fix testing of standalone clang and lld builds.

Remove unrelated parts of diff.

Thu, May 27, 1:33 AM · Restricted Project
jhenderson added a comment to D98437: [SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END records.

Nearly there. Not approving since there's a build error though...

Thu, May 27, 1:08 AM · Restricted Project
jhenderson added inline comments to D102296: [ELF] getRelocatedSection: remove the check for ET_REL object file.
Thu, May 27, 1:02 AM · Restricted Project
jhenderson added inline comments to D103212: [WIP] Changing CG Profile to relocations based..
Thu, May 27, 12:49 AM · Restricted Project
jhenderson added a comment to D103156: [lit] Fix testing of standalone clang and lld builds.

D103154 seems to be making a lot of the same changes as this patch.

Thu, May 27, 12:46 AM · Restricted Project
jhenderson added a comment to D103154: [lit][test] Improve testing of use_llvm_tool.

I just understand what D102630 and this do. Now rm $build/bin/ld.lld; llvm-lit something.s will not pick a ld.lld from PATH. Looks great!

curl -L 'https://reviews.llvm.org/D103154?download=1' | patch -p1
ninja check-lit

says use-llvm-tool.py fails.

Thu, May 27, 12:45 AM · Restricted Project
jhenderson added inline comments to D102900: [llvm-readobj] Print function names with `--bb-addr-map`..
Thu, May 27, 12:42 AM · Restricted Project

Wed, May 26

jhenderson added a comment to D103156: [lit] Fix testing of standalone clang and lld builds.

Depends on D101354.

Typo?

Wed, May 26, 5:32 AM · Restricted Project
jhenderson updated the summary of D103156: [lit] Fix testing of standalone clang and lld builds.
Wed, May 26, 5:32 AM · Restricted Project
jhenderson requested review of D103156: [lit] Fix testing of standalone clang and lld builds.
Wed, May 26, 4:53 AM · Restricted Project
jhenderson updated the diff for D103154: [lit][test] Improve testing of use_llvm_tool.

Fix another comment.

Wed, May 26, 4:13 AM · Restricted Project
jhenderson updated the diff for D103154: [lit][test] Improve testing of use_llvm_tool.

Fix some stale comments.

Wed, May 26, 4:10 AM · Restricted Project
jhenderson requested review of D103154: [lit][test] Improve testing of use_llvm_tool.
Wed, May 26, 4:06 AM · Restricted Project
jhenderson accepted D103146: [NFC][XCOFF] Use yaml2obj in llvm-objdump/XCOFF/section-headers.test instead of binary files..

LGTM.

Wed, May 26, 3:40 AM · Restricted Project
jhenderson accepted D103079: [XCOFF] [llvm-objdump] Add XCOFF recognition of debug section types under `--section-headers` option..

LGTM, thanks!

Wed, May 26, 3:13 AM · Restricted Project
jhenderson added inline comments to D103146: [NFC][XCOFF] Use yaml2obj in llvm-objdump/XCOFF/section-headers.test instead of binary files..
Wed, May 26, 3:11 AM · Restricted Project
jhenderson added a comment to D102277: [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options..

I don't think it's a goal of llvm-objcopy to prevent users from using format-specific options when those formats are not present, or when other formats are present. GNU objcopy doesn't do this, so doing it ourselves is probably a bad idea, as it makes the tool less compatible with GNU, for no real benefit. The exception is for unimplemented options, as discussed earlier.

the problem is in how following case might be handled:

--add-symbol sym1=0x100,global --add-symbol sym2=0x200,elf-specific-flag --add-symbol sym3=0x300,coff-specific-flag

If we allow multiple files with different formats and allow format specific options then above legal situation
could not be handled: while parsing options, for elf there would be detected unknown "coff-specific" value,
for the coff there would be detected unknown "elf-specific" value. This would result in a error for both input files.
i.e. it looks like weak command-line interface which does not work for legal case.

From the other side, GNU objcopy does not solve this case also and the whole case looks quite specific.
so, if we are fine with such a behavior then let it be so.

Wed, May 26, 3:07 AM · Restricted Project
jhenderson added inline comments to D98437: [SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END records.
Wed, May 26, 12:57 AM · Restricted Project
jhenderson accepted D95505: [yaml2obj] Initial support for 32-bit XCOFF in yaml2obj..

LGTM from a yaml2obj standpoint, but it would be a good idea to rope in someone with XCOFF experience to confirm they are happy with the file format writing before committing this.

Wed, May 26, 12:52 AM · Restricted Project
jhenderson added inline comments to D103079: [XCOFF] [llvm-objdump] Add XCOFF recognition of debug section types under `--section-headers` option..
Wed, May 26, 12:48 AM · Restricted Project
jhenderson added a comment to D103125: [Clang][WIP] Allow renaming of "clang".

Can't say I'm super enthusiastic about this (I assume the build already supports prefixes and suffixes, which I'd hope would be adequate - but presumably are not for your use case), though there's some, I think, related prior art: Sony folks (@probinson @jhenderson) have (or had at some point) different C++ language standard/version defaults than upstream and have maintained/made changes to upstream test cases that assume the upstream default version to not make that assumption (to have it explicit). So having some costs/changes upstream for downstream differences like this seems at least vaguely plausible to me.

Wed, May 26, 12:42 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jhenderson accepted D103072: [llvm-readobj] Optimize printing stack sizes to linear time..

LGTM, with nit.

Wed, May 26, 12:34 AM · Restricted Project
jhenderson added a comment to D102296: [ELF] getRelocatedSection: remove the check for ET_REL object file.

@jhenderson: thanks for the suggestion. I'm going to add the Object unit test for this change.
The motivation is the use of relocations by BOLT for function reordering optimization (specifically, to find references to functions). We recommend that users keep relocations in the final binary: https://github.com/facebookincubator/BOLT#usage

I think I follow now, thanks. Dynamic relocations should probably still be omitted by this lookup, i.e. getRelocatedSection only deals with static relocations. Not all dynamic relocation sections have an associated section, so this function will fail on them.

llvm-dwarfdump is relying on getRelocatedSection() to return section_end() for ELF files of types other than relocatable objects. We've changed the function to return relocatable section for other types of ELF files. As a result, llvm-dwarfdump started re-processing relocations for sections that already had relocations applied, e.g. in executable files, and this resulted in wrong values reported.

It seems to me that for Elf_Rel relocations, you can't really reapply them, because the addend has been overwritten by the final patched value. So, as I understand it, the only way you can reliably know how to reapply relocations is with Elf_Rela relocations. I think this means you need to change llvm-dwarfdump too, to only reapply relocations for ET_REL objects? (It's harmless to do so for other ET_* kinds, iff the relocation types are Elf_Rela of course, but it's pointless work).

Presumably we don't want to reapply them, right? (unless BOLT is modifying the relocations and expecting them to be reapplied) I'm assuming there's some property we should be able to observe that indicates the relocations have already been applied so we should ignore them?

Wed, May 26, 12:32 AM · Restricted Project
jhenderson added a comment to D101341: Initialize optional members of ELFYAML types..

@vzakhari, what's the motivation for doing this? These data structures are used within yaml2obj/obj2yaml, although I'm not particularly familiar with the plumbing to identify whether it matters. My suspicion is that it doesn't.

@jhenderson, there are two ways to create a YAML file using YAML mappings. The first one is to create a YAML file from a string bufffer (see line 38 in llvm/unittests/ObjectYAML/ELFYAMLTest.cpp). The second way is to populate the ELFYAML:: data structures and stream them into yaml::Output. Both ways are valid. The second way is a little bit more convenient for programmatic ELF-YAML creation in my downstream application. When I try to use ELFYAML:: data structures, there is no convenient way to make sure that all optional members in them are initialized. Neither default nor zero-initialization works. This is why I made these changes to make sure that all optional members are initialized properly. Note that the default values are not necessarily zeroes.

Wed, May 26, 12:30 AM · Restricted Project

Tue, May 25

jhenderson added a comment to D102277: [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options..

I edited my previous comment with this part:

Actually, current format specific checks verify exactly this : "avoid using of format specific options when multiple inputs in different formats are specified". That probably means that we need to keep them? (To prevent incorrect lazy options parsing)

Tue, May 25, 3:47 AM · Restricted Project
jhenderson accepted D102603: [llvm-objdump] Print the DEBUG type under `--section-headers`..

LGTM, thanks!

Tue, May 25, 3:16 AM · Restricted Project
jhenderson added a comment to D102277: [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options..

Short answer: yes the tools are supposed to work with multiple formats in a single run. llvm-objcopy/llvm-strip need to be compatible with GNU objcopy/strip. I just ran a quick experiment and GNU objcopy is able to handle inputs with different file formats in the same run (I specifically tested COFF and ELF). As such, llvm-objcopy needs to be able to handle the same cases.

For reference, I have heard of instances in the past where people create a single archive containing files of different formats, so that they can use it in a cross-platform manner. The specific example I know of was for an ELF32 target and an ELF64 target, but I believe the principle is equally applicable for COFF, Mach-O etc.

I see. From previous conversation I had an impression that we do not expect multiple inputs in different formats(https://reviews.llvm.org/D99055#2701025). Also, There would be problems with parsing lazy options for the case "multiple inputs in different formats". From that point of view, restriction on avoiding usages of "multiple inputs in different formats" might make sense. Probably, useful restriction would be - avoid using of format specific options when multiple inputs in different formats are specified.

Anyway, if "multiple formats in a single run" is legal then it looks like we need to avoid format specific checks as you suggested. Will update the diff.

Tue, May 25, 2:21 AM · Restricted Project
jhenderson added a comment to D102277: [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options..

Taking the conversation out of line.

Tue, May 25, 1:37 AM · Restricted Project
jhenderson added inline comments to D103072: [llvm-readobj] Optimize printing stack sizes to linear time..
Tue, May 25, 1:16 AM · Restricted Project