Page MenuHomePhabricator
Feed Advanced Search

Today

seiya added a comment to D67689: [llvm-objcopy] Add support for --gap-fill and --pad-to options.

Commented regarding tests and nits. Could you update docs/CommandGuide/llvm-objcopy.rst as well?

Fri, Sep 20, 12:04 AM · Restricted Project

Yesterday

seiya updated the diff for D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..
  • Addressed a review comment.
Thu, Sep 19, 11:23 PM · Restricted Project

Wed, Sep 18

seiya updated the diff for D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..
  • Added a comment for parseELFConfig.
Wed, Sep 18, 2:54 AM · Restricted Project
seiya updated the diff for D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..
Wed, Sep 18, 2:49 AM · Restricted Project

Tue, Sep 17

seiya added a comment to D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..

Thanks you for feedbacks. Putting it all together, the @alexshap's suggestion (D67139#inline-607235) looks desirable to me because:

Tue, Sep 17, 2:49 AM · Restricted Project

Sun, Sep 15

seiya added a comment to D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..

What about having ELFcopyConfig inherit from CopyConfig?

How about this design? I believe moving the CopyConfig is not a big cost.

Sun, Sep 15, 6:07 PM · Restricted Project

Fri, Sep 13

seiya added inline comments to D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..
Fri, Sep 13, 4:04 AM · Restricted Project
seiya updated the diff for D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..

Pass only ELFCopyConfig instead of passing both CopyConfig and ELFCopyConfig.

Fri, Sep 13, 2:24 AM · Restricted Project

Thu, Sep 12

seiya updated the diff for D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..

Adopt @jhenderson's idea D67139#1657802.

Thu, Sep 12, 3:15 AM · Restricted Project

Tue, Sep 10

seiya added inline comments to D67060: [Support] Support restoring colors in WithColor.
Tue, Sep 10, 2:28 AM · Restricted Project
seiya updated the diff for D67060: [Support] Support restoring colors in WithColor.
  • Removed an unrelated change from the diff.
Tue, Sep 10, 2:28 AM · Restricted Project
seiya added a comment to D67060: [Support] Support restoring colors in WithColor.

This patch looks good, but I'd add a test for the new code. Is there any place in LLVM where the current color is saved and restored? If there's such code, you can rewrite the code to see if your code would work as expected.

Tue, Sep 10, 2:24 AM · Restricted Project
seiya updated the diff for D67060: [Support] Support restoring colors in WithColor.

Addressed review comments

Tue, Sep 10, 2:13 AM · Restricted Project

Mon, Sep 9

seiya updated the diff for D67060: [Support] Support restoring colors in WithColor.

Addressed review comments.

Mon, Sep 9, 7:11 PM · Restricted Project
seiya updated the diff for D67060: [Support] Support restoring colors in WithColor.
  • Abandon WithColorContext: save the previous color settings in WithColor instead.
  • Update the description.
Mon, Sep 9, 7:24 AM · Restricted Project

Thu, Sep 5

seiya added a comment to D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..

I've got another suggestion: have separate COFFConfig/ELFConfig etc classes that only contain the interpreted versions and lazily construct them prior to calling the corresponding code path. CopyConfig would contain the raw unparsed strings (perhaps rename them to "RawSymbolsToAdd" etc). Perhaps a higher-level Config class could exist just to wrap them and pass them to executeObjcopyOnBinary etc.

Rough outline:

CopyConfig.h:

class CopyConfig {
  std::vector<StringRef> RawSymbolsToAdd;
  ...
};

class ELFConfig {
  std::vector<NewSymbolInfo> SymbolsToAdd;
  ...
};

// etc for COFF, Mach-O...

llvm-objcopy.cpp:

struct Configurations {
  CopyConfig Common;
  Optional<ELFConfig> ELF;
  ...
}

...

static Error executeObjcopyOnBinary(Configurations &Cfgs, ...) {
  if (/*isElf*/...) {
    if (!Cfgs.ELF)
     Cfgs.ELF.emplace(Cfgs.Common);
    return elf::executeObjcopyOnBinary(Cfgs.Common, Cfgs.ELF, ...)
  }
  ...
}

LGTM. I'll implement the idea.

Thu, Sep 5, 8:03 PM · Restricted Project

Wed, Sep 4

seiya added a comment to D67060: [Support] Support restoring colors in WithColor.

I don't think there's a way to get the current color from the terminal, so you should modify changeColor so that the function remembers the color given to the function.

Wed, Sep 4, 2:37 AM · Restricted Project

Tue, Sep 3

seiya added a comment to D67060: [Support] Support restoring colors in WithColor.

This looks better, but I don't think we need the concept of context. If a function takes a context object, it is usually expected that you can interlace function calls with different context objects freely. Say, you have context object A and B, then you literally have two contexts, and they don't interfere with each other. However, that's not the case for the terminal color. The current color of text output on console is naturally and fundamentally a global state associated to each terminal, and therefore there is only one context. So, I don't think that allowing multiple contexts captures the real concept correctly.

I believe the following scheme models captures the reality better:

  1. Add a new method, getColor, to raw_fd_stream, which returns the current color set by changeColor before
  2. Make a change to WithColor so that it remembers the current color (obtained by calling getColor) before changing color
  3. In the destructor, WithColor restores the previous color
Tue, Sep 3, 11:57 PM · Restricted Project
seiya created D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC..
Tue, Sep 3, 7:24 PM · Restricted Project
seiya added a comment to D66281: [llvm-objcopy][MachO] Implement --strip-all.

@seyia, sorry about the delays with code review, does this particular diff have any unreviewed dependencies ?

Tue, Sep 3, 7:04 PM · Restricted Project
seiya added inline comments to D67060: [Support] Support restoring colors in WithColor.
Tue, Sep 3, 6:52 PM · Restricted Project
seiya added a comment to D67060: [Support] Support restoring colors in WithColor.

Did you find any existing usage of WithColor that depends on the behavior of resetting the color? If not, you don't have to care too much about keeping the compatibility, as that is not really an intended feature as far as I understand. You probably can just change the behavior of WithColor so that it restores to the previous color instead of resseting.

Tue, Sep 3, 6:34 PM · Restricted Project
seiya updated the diff for D67060: [Support] Support restoring colors in WithColor.

Moved NestableWithColor features into WithColor.

Tue, Sep 3, 6:27 PM · Restricted Project
seiya added a comment to D67060: [Support] Support restoring colors in WithColor.

Instead of adding a new class, do you think you can change the behavior of WithColor so that it restores the original colors instead of resetting it?

This would be my preference too, if it's viable. I don't think WithColor has been around that long, so I suspect it may be straightforward to identify existing usage patterns, and I'd be surprised if any expect restoration to default.

Tue, Sep 3, 12:55 AM · Restricted Project

Mon, Sep 2

seiya added reviewers for D67060: [Support] Support restoring colors in WithColor: jhenderson, rupprecht, ruiu, MaskRay.

Added reviewers who may be familiar with this part.

Mon, Sep 2, 12:48 AM · Restricted Project
seiya updated the summary of D67060: [Support] Support restoring colors in WithColor.
Mon, Sep 2, 12:44 AM · Restricted Project
seiya updated the summary of D67060: [Support] Support restoring colors in WithColor.
Mon, Sep 2, 12:44 AM · Restricted Project
seiya added a comment to D67060: [Support] Support restoring colors in WithColor.

This patch does not include tests but it will be used in D65191.

Mon, Sep 2, 12:27 AM · Restricted Project
seiya created D67060: [Support] Support restoring colors in WithColor.
Mon, Sep 2, 12:24 AM · Restricted Project

Tue, Aug 27

seiya added a comment to D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing.

Test cases for the new code?

I forgot to add NFC in the title. This patch does not introduce new features thus we don't need new tests for it I think.

Tue, Aug 27, 8:38 PM · Restricted Project
seiya retitled D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing from [llvm-objcopy] Accept MachO formats in commad-line parsing. NFC. to [llvm-objcopy] Accept MachO formats in commad-line parsing.
Tue, Aug 27, 8:38 PM · Restricted Project
seiya added a comment to D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing.

Test cases for the new code?

Tue, Aug 27, 8:33 PM · Restricted Project
seiya retitled D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing from [llvm-objcopy] Accept MachO formats in commad-line parsing to [llvm-objcopy] Accept MachO formats in commad-line parsing. NFC..
Tue, Aug 27, 8:31 PM · Restricted Project

Mon, Aug 26

seiya added inline comments to D65191: [llvm-objdump] Implement highlighting.
Mon, Aug 26, 7:57 PM · Restricted Project
seiya updated the diff for D66409: [llvm-objcopy][MachO] Implement -Obinary.

Addressed a review comment.

Mon, Aug 26, 7:57 PM · Restricted Project
seiya added inline comments to D66409: [llvm-objcopy][MachO] Implement -Obinary.
Mon, Aug 26, 7:57 PM · Restricted Project
seiya updated the diff for D66409: [llvm-objcopy][MachO] Implement -Obinary.

Addressed review comments.

Mon, Aug 26, 7:57 PM · Restricted Project
seiya added inline comments to D66409: [llvm-objcopy][MachO] Implement -Obinary.
Mon, Aug 26, 7:57 PM · Restricted Project
seiya added inline comments to D66517: [llvm-objdump] - Remove one overload of reportError. NFCI..
Mon, Aug 26, 3:14 AM · Restricted Project
seiya added inline comments to D66517: [llvm-objdump] - Remove one overload of reportError. NFCI..
Mon, Aug 26, 2:33 AM · Restricted Project
seiya planned changes to D65541: [llvm-objcopy][MachO] Implement --only-section.

I'll submit another patch to refactor CopyConfig as described in https://reviews.llvm.org/D65541#inline-594247

Mon, Aug 26, 1:36 AM · Restricted Project
seiya added inline comments to D66407: [llvm-objcopy][MachO] Implement -Ibinary.
Mon, Aug 26, 1:34 AM · Restricted Project
seiya updated the diff for D66407: [llvm-objcopy][MachO] Implement -Ibinary.

Addressed review comments and added test for arm64.

Mon, Aug 26, 1:27 AM · Restricted Project
seiya added inline comments to D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing.
Mon, Aug 26, 1:22 AM · Restricted Project
seiya updated the diff for D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing.

Addressed review comments.

Mon, Aug 26, 1:22 AM · Restricted Project

Thu, Aug 22

seiya added inline comments to D65541: [llvm-objcopy][MachO] Implement --only-section.
Thu, Aug 22, 10:51 PM · Restricted Project
seiya added inline comments to D65541: [llvm-objcopy][MachO] Implement --only-section.
Thu, Aug 22, 10:20 PM · Restricted Project
seiya accepted D66432: [llvm-objcopy][NFC] Refactor symbol/section matching.
Thu, Aug 22, 1:12 AM · Restricted Project

Aug 20 2019

seiya updated the diff for D66408: [llvm-objcopy][MachO] Implement --dump-section.

CommandGuide: Removed remove "the" before "<section>".

Aug 20 2019, 6:25 AM · Restricted Project
seiya updated the diff for D66283: [llvm-objcopy][MachO] Implement --add-section.

CommandGuide: Removed remove "the" before "<section>".

Aug 20 2019, 6:24 AM · Restricted Project
seiya updated the diff for D66282: [llvm-objcopy][MachO] Implement --remove-section.

CommandGuide: Removed remove "the" before "<section>".

Aug 20 2019, 6:24 AM · Restricted Project
seiya updated the diff for D65541: [llvm-objcopy][MachO] Implement --only-section.

Updated CommandGuide.

Aug 20 2019, 6:24 AM · Restricted Project
seiya added inline comments to D66408: [llvm-objcopy][MachO] Implement --dump-section.
Aug 20 2019, 6:23 AM · Restricted Project
seiya updated the diff for D66408: [llvm-objcopy][MachO] Implement --dump-section.

Addressed review comments.

Aug 20 2019, 6:23 AM · Restricted Project
seiya updated the diff for D66407: [llvm-objcopy][MachO] Implement -Ibinary.

Addressed review comments.

Aug 20 2019, 6:23 AM · Restricted Project
seiya updated the diff for D66408: [llvm-objcopy][MachO] Implement --dump-section.

Update CommandGuide.

Aug 20 2019, 6:10 AM · Restricted Project
seiya updated the diff for D66407: [llvm-objcopy][MachO] Implement -Ibinary.

Update CommandGuide.

Aug 20 2019, 6:08 AM · Restricted Project
seiya updated the diff for D66283: [llvm-objcopy][MachO] Implement --add-section.

Update CommandGuide.

Aug 20 2019, 6:08 AM · Restricted Project
seiya updated the diff for D66282: [llvm-objcopy][MachO] Implement --remove-section.

Update CommandGuide.

Aug 20 2019, 6:08 AM · Restricted Project
seiya added inline comments to D65190: [X86] X86ATTInstPrinter: replace markup with startMarkup/endMarkup.
Aug 20 2019, 5:59 AM · Restricted Project
seiya updated the diff for D65190: [X86] X86ATTInstPrinter: replace markup with startMarkup/endMarkup.

Clang-formatted.

Aug 20 2019, 5:59 AM · Restricted Project
seiya updated the diff for D65191: [llvm-objdump] Implement highlighting.

clang-formatted

Aug 20 2019, 5:59 AM · Restricted Project
seiya added inline comments to D65191: [llvm-objdump] Implement highlighting.
Aug 20 2019, 5:59 AM · Restricted Project
seiya updated the diff for D65191: [llvm-objdump] Implement highlighting.
Aug 20 2019, 5:51 AM · Restricted Project
seiya committed rGb8dcc193890c: [yaml2obj/obj2yaml][MachO] Fix a test failure in big endian hosts (authored by seiya).
[yaml2obj/obj2yaml][MachO] Fix a test failure in big endian hosts
Aug 20 2019, 3:00 AM
seiya committed rL369360: [yaml2obj/obj2yaml][MachO] Fix a test failure in big endian hosts.
[yaml2obj/obj2yaml][MachO] Fix a test failure in big endian hosts
Aug 20 2019, 2:57 AM
seiya committed rG522377494b3d: [yaml2obj/obj2yaml][MachO] Allow setting custom section data (authored by seiya).
[yaml2obj/obj2yaml][MachO] Allow setting custom section data
Aug 20 2019, 1:49 AM
seiya committed rL369348: [yaml2obj/obj2yaml][MachO] Allow setting custom section data.
[yaml2obj/obj2yaml][MachO] Allow setting custom section data
Aug 20 2019, 1:48 AM
seiya closed D65799: [yaml2obj/obj2yaml][MachO] Allow setting custom section data.
Aug 20 2019, 1:48 AM · Restricted Project
seiya committed rG36848ff8dfb3: [llvm-objcopy][MachO] Fix method names. NFC. (authored by seiya).
[llvm-objcopy][MachO] Fix method names. NFC.
Aug 20 2019, 1:37 AM
seiya committed rL369346: [llvm-objcopy][MachO] Fix method names. NFC..
[llvm-objcopy][MachO] Fix method names. NFC.
Aug 20 2019, 1:36 AM
seiya closed D65540: [llvm-objcopy][MachO] Fix method names. NFC..
Aug 20 2019, 1:36 AM · Restricted Project

Aug 19 2019

seiya updated the diff for D66407: [llvm-objcopy][MachO] Implement -Ibinary.

Added a newline at the end of file.

Aug 19 2019, 3:27 PM · Restricted Project
seiya removed a child revision for D66283: [llvm-objcopy][MachO] Implement --add-section: D66407: [llvm-objcopy][MachO] Implement -Ibinary.
Aug 19 2019, 3:27 PM · Restricted Project
seiya added a child revision for D66283: [llvm-objcopy][MachO] Implement --add-section: D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing.
Aug 19 2019, 3:27 PM · Restricted Project
seiya added a parent revision for D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing: D66283: [llvm-objcopy][MachO] Implement --add-section.
Aug 19 2019, 3:27 PM · Restricted Project
seiya edited parent revisions for D66407: [llvm-objcopy][MachO] Implement -Ibinary, added: 1; removed: 1.
Aug 19 2019, 3:27 PM · Restricted Project
seiya added a child revision for D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing: D66407: [llvm-objcopy][MachO] Implement -Ibinary.
Aug 19 2019, 3:27 PM · Restricted Project
seiya updated the diff for D66407: [llvm-objcopy][MachO] Implement -Ibinary.

Moved changes to CopyConfig to D66449.

Aug 19 2019, 3:27 PM · Restricted Project
Herald added a reviewer for D66449: [llvm-objcopy] Accept MachO formats in commad-line parsing: rupprecht.
Aug 19 2019, 3:21 PM · Restricted Project
seiya updated the diff for D66409: [llvm-objcopy][MachO] Implement -Obinary.

Fixed review comments.

Aug 19 2019, 2:47 PM · Restricted Project
seiya updated the diff for D66408: [llvm-objcopy][MachO] Implement --dump-section.

Fixed review comments.

Aug 19 2019, 2:46 PM · Restricted Project
seiya updated the diff for D66407: [llvm-objcopy][MachO] Implement -Ibinary.
  • No such file or directory -> {{[Nn]}}o such file or directory
Aug 19 2019, 2:46 PM · Restricted Project
seiya updated the diff for D66283: [llvm-objcopy][MachO] Implement --add-section.

Fixed a review comment.

Aug 19 2019, 2:46 PM · Restricted Project
seiya updated the diff for D66282: [llvm-objcopy][MachO] Implement --remove-section.

Address review comments.

Aug 19 2019, 2:46 PM · Restricted Project
seiya updated the diff for D65541: [llvm-objcopy][MachO] Implement --only-section.

Fix a review comment.

Aug 19 2019, 2:43 PM · Restricted Project
seiya added inline comments to D65541: [llvm-objcopy][MachO] Implement --only-section.
Aug 19 2019, 2:43 PM · Restricted Project
seiya committed rG12bd490427d7: Recommit "[llvm-objcopy][MachO] Implement a layout algorithm for executables" (authored by seiya).
Recommit "[llvm-objcopy][MachO] Implement a layout algorithm for executables"
Aug 19 2019, 2:14 PM
seiya committed rL369301: Recommit "[llvm-objcopy][MachO] Implement a layout algorithm for executables".
Recommit "[llvm-objcopy][MachO] Implement a layout algorithm for executables"
Aug 19 2019, 2:13 PM
seiya committed rG552bcb854cfd: Recommit "[llvm-objcopy][MachO] Support load commands used in… (authored by seiya).
Recommit "[llvm-objcopy][MachO] Support load commands used in…
Aug 19 2019, 2:12 PM
seiya committed rL369298: Recommit "[llvm-objcopy][MachO] Support load commands used in….
Recommit "[llvm-objcopy][MachO] Support load commands used in…
Aug 19 2019, 2:09 PM
seiya planned changes to D66407: [llvm-objcopy][MachO] Implement -Ibinary.

I'll add another patch to isolate changes to CopyConfig.

Aug 19 2019, 3:04 AM · Restricted Project
seiya added a parent revision for D66409: [llvm-objcopy][MachO] Implement -Obinary: D66408: [llvm-objcopy][MachO] Implement --dump-section.
Aug 19 2019, 1:58 AM · Restricted Project
seiya added a child revision for D66407: [llvm-objcopy][MachO] Implement -Ibinary: D66408: [llvm-objcopy][MachO] Implement --dump-section.
Aug 19 2019, 1:58 AM · Restricted Project
seiya added a child revision for D66408: [llvm-objcopy][MachO] Implement --dump-section: D66409: [llvm-objcopy][MachO] Implement -Obinary.
Aug 19 2019, 1:58 AM · Restricted Project
seiya added a parent revision for D66408: [llvm-objcopy][MachO] Implement --dump-section: D66407: [llvm-objcopy][MachO] Implement -Ibinary.
Aug 19 2019, 1:58 AM · Restricted Project
seiya added a child revision for D66283: [llvm-objcopy][MachO] Implement --add-section: D66407: [llvm-objcopy][MachO] Implement -Ibinary.
Aug 19 2019, 1:57 AM · Restricted Project
seiya added a parent revision for D66407: [llvm-objcopy][MachO] Implement -Ibinary: D66283: [llvm-objcopy][MachO] Implement --add-section.
Aug 19 2019, 1:57 AM · Restricted Project
Herald added a reviewer for D66409: [llvm-objcopy][MachO] Implement -Obinary: rupprecht.
Aug 19 2019, 1:57 AM · Restricted Project
Herald added a reviewer for D66408: [llvm-objcopy][MachO] Implement --dump-section: rupprecht.
Aug 19 2019, 1:57 AM · Restricted Project