Page MenuHomePhabricator
Feed Advanced Search

Today

jhenderson added a comment to D59542: [llvm-objcopy] - Use replaceSectionReferences to update the sections for symbols in symbol table..

Nice catch. Should we remove the loop in RelocationSection::replaceSectionReferences that updates the symbols? I think that's unnecessary now, if we are looping over all symbols in the symbol table.

Tue, Mar 19, 7:27 AM
jhenderson added inline comments to D59496: [llvm-objcopy] - Fix a st_name of the first symbol table entry..
Tue, Mar 19, 7:22 AM
jhenderson added a comment to D59186: [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU style`.

I'm always in favour of splitting up changes into multiple smaller reviews, as long as it doesn't make things more complicated by requiring temporary logic or whatever that is just going to be removed again immediately. It'll hopefully help diffing the changes too.

Tue, Mar 19, 4:26 AM · Restricted Project
jhenderson added a comment to D59483: [llvm-objcopy]Preserve data in segments not covered by sections.

The code looks good to me but the test is going to take me a while to review. I don't think I'll get to this today.

Yeah, sorry about that. Let me know if you need any help in deciphering it!

Tue, Mar 19, 4:19 AM · Restricted Project
jhenderson added inline comments to D59496: [llvm-objcopy] - Fix a st_name of the first symbol table entry..
Tue, Mar 19, 4:11 AM

Yesterday

jhenderson updated the diff for D59483: [llvm-objcopy]Preserve data in segments not covered by sections.

Fix the test to use a correct regex pattern, and add content to the "blob" sections to show that sections are set to zero post-removal, as desired.

Mon, Mar 18, 10:09 AM · Restricted Project
jhenderson added a comment to D59496: [llvm-objcopy] - Fix a st_name of the first symbol table entry..

Perhaps you should add a test for other empty-named symbols?

Mon, Mar 18, 9:53 AM
jhenderson added a comment to D59351: [llvm-objcopy] Add --update-section.

I suspect that this is going to interact nastily with D59843.

Sorry, can't find this patch. What's this?

Oops typo (now fixed). It should be D59483.

Mon, Mar 18, 7:07 AM
jhenderson added a comment to D59025: Add --add-ghashes to llvm-objcopy to append a .debug$H to coff objects.

Anyway, I'm not really that opposed to this change, I just want to figure out what's the threshold for adding flags like this. It's probably totally fine, especially as it seems fairly isolated. I added a few other reviewers who might have an idea. I've never heard of ghashes, so I might not be the best person to comment on this change (other than my existing comments).

Mon, Mar 18, 6:40 AM · Restricted Project
jhenderson accepted D59488: [llvm-objcopy] - Calculate the string table section sizes correctly..

LGTM, with a couple of comment nits.

Mon, Mar 18, 6:37 AM · Restricted Project
jhenderson added a comment to D59351: [llvm-objcopy] Add --update-section.

I suspect that this is going to interact nastily with D59843. Does GNU objcopy support updating sections within segments?

Mon, Mar 18, 6:29 AM
jhenderson created D59483: [llvm-objcopy]Preserve data in segments not covered by sections.
Mon, Mar 18, 5:39 AM · Restricted Project
jhenderson added a comment to D59482: [ObjectYAML] Add basic minidump generation support.

I've not reviewed the unit test yet, but the bulk of the body looks fine, apart from some minor details.

Mon, Mar 18, 3:47 AM · Restricted Project

Fri, Mar 15

jhenderson added inline comments to D59372: [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset.
Fri, Mar 15, 3:42 AM · Restricted Project
jhenderson committed rGb10f48bbb479: [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset (authored by jhenderson).
[yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset
Fri, Mar 15, 3:37 AM
jhenderson committed rL356247: [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset.
[yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset
Fri, Mar 15, 3:36 AM
jhenderson closed D59372: [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset.
Fri, Mar 15, 3:36 AM · Restricted Project
jhenderson added a comment to D59372: [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset.

Thanks! Just to note that this does NOT force the sections that are in the segments to appear at different offsets than they otherwise would. That will require some different changes at some point, which I would certainly appreciate, but don't need at the moment, because you can use the section's address align value to achieve the same effect usually.

Fri, Mar 15, 3:08 AM · Restricted Project
jhenderson accepted D59033: [llvm-objcopy] Make .build-id linking atomic.

LGTM. It might be worth getting somebody who has worked on stuff in the Support library before to review this too, but I'll leave that up to you.

Fri, Mar 15, 2:43 AM · Restricted Project

Thu, Mar 14

jhenderson created D59372: [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset.
Thu, Mar 14, 10:34 AM · Restricted Project
jhenderson added a comment to D59291: [Object] Add basic minidump support.

I haven't really looked at the behaviour to make sure it makes sense, but I've made a number of comments on the comments and one or two other things.

Thu, Mar 14, 10:21 AM · Restricted Project
jhenderson committed rGb5de5e25de85: [llvm-objcopy]Don't implicitly strip sections in segments (authored by jhenderson).
[llvm-objcopy]Don't implicitly strip sections in segments
Thu, Mar 14, 4:49 AM
jhenderson committed rL356136: [llvm-objcopy]Don't implicitly strip sections in segments.
[llvm-objcopy]Don't implicitly strip sections in segments
Thu, Mar 14, 4:49 AM
jhenderson committed rGe81f5f91b496: Revert r356129 due to greendragon bot failures (authored by jhenderson).
Revert r356129 due to greendragon bot failures
Thu, Mar 14, 4:25 AM
jhenderson committed rL356133: Revert r356129 due to greendragon bot failures.
Revert r356129 due to greendragon bot failures
Thu, Mar 14, 4:22 AM
jhenderson committed rGc03a95d46576: [llvm-objcopy]Don't implicitly strip sections in segments (authored by jhenderson).
[llvm-objcopy]Don't implicitly strip sections in segments
Thu, Mar 14, 3:22 AM
jhenderson committed rL356129: [llvm-objcopy]Don't implicitly strip sections in segments.
[llvm-objcopy]Don't implicitly strip sections in segments
Thu, Mar 14, 3:21 AM
jhenderson closed D59293: [llvm-objcopy]Don't implicitly strip sections in segments.
Thu, Mar 14, 3:21 AM · Restricted Project
jhenderson added inline comments to D59293: [llvm-objcopy]Don't implicitly strip sections in segments.
Thu, Mar 14, 3:06 AM · Restricted Project
jhenderson added inline comments to D59033: [llvm-objcopy] Make .build-id linking atomic.
Thu, Mar 14, 3:00 AM · Restricted Project

Wed, Mar 13

jhenderson added inline comments to D59026: [www][GSOC2019]Add LLVM binary tools project.
Wed, Mar 13, 9:57 AM · Restricted Project
jhenderson committed rL356066: [www]Fix subsection title to match table of contents.
[www]Fix subsection title to match table of contents
Wed, Mar 13, 9:55 AM
jhenderson added a comment to D59291: [Object] Add basic minidump support.

So, if we want to split this up more, I can propose the following:

  • split off the BinaryFormat&Object changes into a separate patch, test it with some inline C char arrays
  • write the yaml2obj equivalent of this patch, test it via unit tests and the Object minidump reader
  • finally, come back to this patch (obj2yaml), test it via yamlobj|obj2yaml round-tripping

    What do you think?

This sounds like a reasonable breakdown to me. Another possibility for testing yaml2obj is some form of minidump support in llvm-readobj or similar, which uses the Object minidump reader to verify things in lit tests.

Wed, Mar 13, 6:53 AM · Restricted Project
jhenderson added a comment to D59291: [Object] Add basic minidump support.

Is it possible to unit-test some of the Object and BinaryFormat changes? That would allow you to split those parts away from the obj2yaml changes. Also, if you added support in yaml2obj, you could test that, then use that in testing the obj2yaml changes more easily, rather than relying on a canned binary.

Wed, Mar 13, 4:49 AM · Restricted Project
jhenderson updated the summary of D59293: [llvm-objcopy]Don't implicitly strip sections in segments.
Wed, Mar 13, 4:33 AM · Restricted Project
jhenderson created D59293: [llvm-objcopy]Don't implicitly strip sections in segments.
Wed, Mar 13, 4:32 AM · Restricted Project

Tue, Mar 12

jhenderson committed rG9bc817a0ae7d: [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad… (authored by jhenderson).
[yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad…
Tue, Mar 12, 10:01 AM
jhenderson committed rL355938: [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad….
[yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad…
Tue, Mar 12, 10:01 AM
jhenderson closed D58510: [yaml2obj]Allow explicit symbol indexes in relocations and emit error for bad names.
Tue, Mar 12, 10:01 AM · Restricted Project
jhenderson committed rGb69a50115bd5: [llvm-cxxfilt]Add test to show that empty lines can be handled (authored by jhenderson).
[llvm-cxxfilt]Add test to show that empty lines can be handled
Tue, Mar 12, 8:45 AM
jhenderson committed rL355929: [llvm-cxxfilt]Add test to show that empty lines can be handled.
[llvm-cxxfilt]Add test to show that empty lines can be handled
Tue, Mar 12, 8:45 AM
jhenderson closed D58785: [llvm-cxxfilt]Add test to show that empty lines can be handled.
Tue, Mar 12, 8:45 AM · Restricted Project
jhenderson committed rG662c043628c1: [FileCheck]Remove assertions that prevent matching an empty string at file… (authored by jhenderson).
[FileCheck]Remove assertions that prevent matching an empty string at file…
Tue, Mar 12, 8:37 AM
jhenderson committed rL355928: [FileCheck]Remove assertions that prevent matching an empty string at file….
[FileCheck]Remove assertions that prevent matching an empty string at file…
Tue, Mar 12, 8:36 AM
jhenderson closed D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.
Tue, Mar 12, 8:36 AM · Restricted Project
jhenderson accepted D59175: [llvm-readobj] Print symbol version when dumping relocations (PR31564).

LGTM.

Tue, Mar 12, 7:14 AM · Restricted Project
jhenderson added inline comments to D59175: [llvm-readobj] Print symbol version when dumping relocations (PR31564).
Tue, Mar 12, 6:44 AM · Restricted Project
jhenderson added inline comments to D59251: [Documentation] Proposal for plan to change variable names.
Tue, Mar 12, 6:35 AM · Restricted Project
jhenderson added inline comments to D59175: [llvm-readobj] Print symbol version when dumping relocations (PR31564).
Tue, Mar 12, 6:31 AM · Restricted Project
jhenderson added a comment to D59186: [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU style`.

I'll leave this to James. AFAIK he will do a BoF at LLVM 2019.

Cool! I would like to watch it on Youtube ...
Thank you for taking time review this.

BoFs are not usually recorded, I believe, but there will be a write-up published on llvm-dev hopefully after the event.

Tue, Mar 12, 5:37 AM · Restricted Project
jhenderson added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

Has anyone raised a solid objection to this patch? If not, I see no reason to delay it further. We can always add replacement assertions later.

This patch does not enable initial CHECK-{SAME,NEXT,EMPTY}. I don't recall a pressing need for a directive that matches only the first line, and we don't seem to be converging on whether it should be one of those or some new directive. Maybe we should take a step back for a while and try this discussion again later.

@probinson?

Tue, Mar 12, 3:14 AM · Restricted Project
jhenderson added inline comments to D59175: [llvm-readobj] Print symbol version when dumping relocations (PR31564).
Tue, Mar 12, 3:07 AM · Restricted Project
jhenderson added a comment to D59186: [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU style`.

Are you definitely going to implement a GNU style after this? Otherwise, you've removed any form of support from the GNU dumper, without replacing it with something.

Tue, Mar 12, 3:03 AM · Restricted Project

Mon, Mar 11

jhenderson added inline comments to D59097: [yaml2obj]Lookup relocation symbols in dynamic symbol when .dynsym referenced.
Mon, Mar 11, 9:56 AM · Restricted Project
jhenderson planned changes to D59097: [yaml2obj]Lookup relocation symbols in dynamic symbol when .dynsym referenced.

I forgot to run all the test before putting this patch up for review, and llvm-readobj/demangle.test is failing in a non-trivial way, which I'll need to fix. It may result in a different change in yaml2obj going in first, to fix segment offsets that contain .dynstr and .dynsym based on my first look.

Mon, Mar 11, 4:01 AM · Restricted Project
jhenderson added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

Are we planning to say that an initial empty line must be matched with CHECK-FIRSTLINE: {{^$}}?

It seems we're creating yet another directive with new quirks that must be learned to use it correctly. And yet, when formally specified, it's exactly the same as CHECK-SAME except that it can be and can only be the initial directive. For those reasons, Paul's interpretation of initial CHECK-SAME (including rejection of initial CHECK-NEXT/CHECK-EMPTY with diagnostics pointing to CHECK-SAME) seems simpler and thus more user-friendly than introducing CHECK-FIRSTLINE.

Whether we choose CHECK-FIRSTLINE or Paul's interpretation of initial CHECK-SAME, I still wouldn't like the asymmetry that a {{^$}} pattern must be used to match an empty first line while CHECK-EMPTY must be used to match other consecutive lines that are empty. I'd also be disappointed that a CHECK-DAG-NEXT block, which we proposed in another review, couldn't be used to match all (unordered) lines of input.

Mon, Mar 11, 3:10 AM · Restricted Project
jhenderson added inline comments to D59033: [llvm-objcopy] Make .build-id linking atomic.
Mon, Mar 11, 3:01 AM · Restricted Project
jhenderson added a comment to D58960: [llvm-objcopy] - Fix --compress-debug-sections when there are relocations..

It's probably worth adding a TODO or filing an enhancement bug for the other section types this makes sense for, e.g. symbol tables (to move symbols to the new section) or group sections (update referred-to symbol table/change group contents etc).

I need a bit more time to investigate these scenarios. I'll try to take a look during this week.

Mon, Mar 11, 2:21 AM · Restricted Project
jhenderson accepted D59126: llvm-objcopy: Remove unused field. NFCI..

Yes, you're probably right. I've been thinking about this a bit since making my last comment, and just having the segment data doesn't necessarily seem all that useful, because we're actually only interested in the data not covered by sections. Go ahead and land this. I can always revert bits of it if the new implementation needs it.

Mon, Mar 11, 2:07 AM · Restricted Project
jhenderson added a comment to D58960: [llvm-objcopy] - Fix --compress-debug-sections when there are relocations..

It's probably worth adding a TODO or filing an enhancement bug for the other section types this makes sense for, e.g. symbol tables (to move symbols to the new section) or group sections (update referred-to symbol table/change group contents etc).

Mon, Mar 11, 2:04 AM · Restricted Project

Fri, Mar 8

jhenderson committed rGb41130bedcd3: [llvm-readelf]Don't lose negative-ness of negative addends for no symbol… (authored by jhenderson).
[llvm-readelf]Don't lose negative-ness of negative addends for no symbol…
Fri, Mar 8, 5:24 AM
jhenderson committed rL355696: [llvm-readelf]Don't lose negative-ness of negative addends for no symbol….
[llvm-readelf]Don't lose negative-ness of negative addends for no symbol…
Fri, Mar 8, 5:21 AM
jhenderson closed D59095: [llvm-readelf]Don't lose negative-ness of negative addends for no symbol relocations.
Fri, Mar 8, 5:21 AM · Restricted Project
jhenderson requested changes to D59126: llvm-objcopy: Remove unused field. NFCI..

Right, I did lots of digging and discovered that this was added originally for binary output support, in rL310127. The usage was removed when binary output support was changed to be driven by segments in r318324. It was never used for regular ELF output, but I think it should be.

Fri, Mar 8, 3:22 AM · Restricted Project
jhenderson committed rL355686: [www][GSOC2019]Add LLVM binary tools project.
[www][GSOC2019]Add LLVM binary tools project
Fri, Mar 8, 2:49 AM
jhenderson closed D59026: [www][GSOC2019]Add LLVM binary tools project.
Fri, Mar 8, 2:49 AM · Restricted Project
jhenderson added a comment to D59126: llvm-objcopy: Remove unused field. NFCI..

Could you hold off on doing this for a bit? As @jakehehrlich mentioned by email, this was being used to write segment data not owned by sections, I think, and I could do with that behaviour. I'm just investigating why it got removed at the moment, and may come forward with patch in the next few days to make use of it again. I may decide not to bother, in which case I'll give an LGTM.

Fri, Mar 8, 2:12 AM · Restricted Project
jhenderson added a comment to D59095: [llvm-readelf]Don't lose negative-ness of negative addends for no symbol relocations.

Thanks all. I am already planning a number of follow-up changes to fix the issues re. consistent formatting and the LLONG_MIN comment. This particular issue however is something I needed more urgently, so wanted to fix first.

Fri, Mar 8, 1:44 AM · Restricted Project
jhenderson added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

OK sounds like we should invent a CHECK-FIRSTLINE directive. (Let's not call it CHECK-FIRST because people could think it means "do these first before other checks.") It must be the first directive, and its pattern must match on the first line of input (before the first newline).
Does that satisfy the requirements?

Fri, Mar 8, 1:39 AM · Restricted Project
jhenderson accepted D59060: Compute and Print Type and Section columns in "llvm-nm -f sysv" output. Round 2..

LGTM.

Fri, Mar 8, 1:30 AM · Restricted Project

Thu, Mar 7

jhenderson created D59097: [yaml2obj]Lookup relocation symbols in dynamic symbol when .dynsym referenced.
Thu, Mar 7, 8:58 AM · Restricted Project
jhenderson created D59095: [llvm-readelf]Don't lose negative-ness of negative addends for no symbol relocations.
Thu, Mar 7, 7:37 AM · Restricted Project
jhenderson accepted D59089: [llvm-readobj] Dump DT_USED value as string like GNU readelf does.

LGTM.

Thu, Mar 7, 5:34 AM · Restricted Project
jhenderson added inline comments to D59089: [llvm-readobj] Dump DT_USED value as string like GNU readelf does.
Thu, Mar 7, 4:37 AM · Restricted Project
jhenderson accepted D59082: [yaml2obj] - Allow producing ELFDATANONE ELFs.

LGTM, with one nit.

Thu, Mar 7, 3:52 AM · Restricted Project
jhenderson added inline comments to D59082: [yaml2obj] - Allow producing ELFDATANONE ELFs.
Thu, Mar 7, 3:51 AM · Restricted Project
jhenderson added a comment to D59082: [yaml2obj] - Allow producing ELFDATANONE ELFs.

What about support for other invalid data encodings e.g. 3, 4 etc?

Thu, Mar 7, 3:19 AM · Restricted Project
jhenderson updated the diff for D59026: [www][GSOC2019]Add LLVM binary tools project.

Add @rupprecht as another mentor (discussed offline).

Thu, Mar 7, 3:06 AM · Restricted Project
jhenderson accepted D59081: [llvm-objcopy] Remove unneeded checks. NFC.

LGTM, personally, but I know @jakehehrlich had some thoughts on this, so I'd like him to give a thumbs up on it before this lands. See for example comments on D49979.

Thu, Mar 7, 2:52 AM · Restricted Project
jhenderson added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

@jhenderson Is your goal with the testcase you wrote this patch for to match a line at an absolute line number (eg line 1 in this case) or to match a line at a given line offset from the beginning of the input or region of input? My clumsily suggested CHECK-EMPTY-L1 would be for the latter case and CHECK-FIRST for the former case (and should be CHECK-EMPTY-FIRST for consistency, not sure how to generalize to any relative line number).

In this particular case, it's the very first line, as otherwise I could use one of the other CHECK directives to get the same goal (e.g. CHECK-EMPTY).

Thu, Mar 7, 2:47 AM · Restricted Project
jhenderson added inline comments to D59060: Compute and Print Type and Section columns in "llvm-nm -f sysv" output. Round 2..
Thu, Mar 7, 2:47 AM · Restricted Project
jhenderson added a comment to D59033: [llvm-objcopy] Make .build-id linking atomic.

Missing context is making it hard for me to review the Path changes.

Thu, Mar 7, 2:33 AM · Restricted Project

Wed, Mar 6

jhenderson added a comment to D58784: [FileCheck]Remove assertions that prevent matching an empty string at file start before CHECK-NEXT/SAME.

Sudden thought: Why are these assertions anyway? Shouldn't they be normal diagnostics? Or does FileCheck always have assertions on?

There are already normal diagnostics preventing the first check being a CHECK-NEXT or CHECK-SAME, so we don't need these assertions at this point, as the diagnostics have already happened. If we remove the assertions as I propose, and decide to let CHECK-SAME be usable on the first line, then those earlier diagnostics will still want to check that CHECK-NEXT is not used there (i.e. remain unchanged for CHECK-NEXT), as they do now.

Wed, Mar 6, 9:15 AM · Restricted Project
jhenderson created D59026: [www][GSOC2019]Add LLVM binary tools project.
Wed, Mar 6, 8:38 AM · Restricted Project
jhenderson accepted D59018: [llvm-objcopy] - Fix incorrect CompressedSection creation..

Okay, LGTM.

Wed, Mar 6, 5:30 AM · Restricted Project
jhenderson accepted D59019: [llvm-objcopy] - Remove an excessive zlib::isAvailable() check and dead code..

LGTM, even without the assertion.

Wed, Mar 6, 4:52 AM · Restricted Project
jhenderson added inline comments to D59017: [llvm-objcopy] - Remove dead code. NFCI..
Wed, Mar 6, 4:52 AM · Restricted Project
jhenderson added a comment to D59018: [llvm-objcopy] - Fix incorrect CompressedSection creation..

The code change looks good, but I'm not sure I understand why you can't test this, i.e. where you have an input with a compressed section starting with .zdebug and showing that it is decompressed? I've forgotten the design a bit though, so perhaps you could clarify when you get CompressedSection instances and what they are used for?

Wed, Mar 6, 4:46 AM · Restricted Project
jhenderson added inline comments to D59019: [llvm-objcopy] - Remove an excessive zlib::isAvailable() check and dead code..
Wed, Mar 6, 4:33 AM · Restricted Project
jhenderson accepted D59017: [llvm-objcopy] - Remove dead code. NFCI..

LGTM.

Wed, Mar 6, 4:33 AM · Restricted Project
jhenderson added inline comments to D59017: [llvm-objcopy] - Remove dead code. NFCI..
Wed, Mar 6, 4:33 AM · Restricted Project

Tue, Mar 5

jhenderson added a comment to D58960: [llvm-objcopy] - Fix --compress-debug-sections when there are relocations..

This LGTM, but I'd like to get a thumbs up from @jakehehrlich or @rupprecht to confirm that the replaceSectionReferences method makes sense to them too.

Tue, Mar 5, 7:21 AM · Restricted Project
jhenderson accepted D58960: [llvm-objcopy] - Fix --compress-debug-sections when there are relocations..

This LGTM, but I'd like to get a thumbs up from @jakehehrlich or @rupprecht to confirm that the replaceSectionReferences method makes sense to them too.

Tue, Mar 5, 7:21 AM · Restricted Project
jhenderson accepted D58762: [BinaryFormat] Add DT_USED tag into dynamic section..

Okay, LGTM. @grimar's logic is convincing enough to me, when combined with GNU's support for it.

Tue, Mar 5, 5:39 AM · Restricted Project
jhenderson added inline comments to D58960: [llvm-objcopy] - Fix --compress-debug-sections when there are relocations..
Tue, Mar 5, 4:43 AM · Restricted Project
jhenderson accepted D58908: [llvm-objcopy] - SImplify `isCompressable` and fix the issue relative..

LGTM.

Tue, Mar 5, 4:25 AM · Restricted Project
jhenderson added a comment to D58909: [llvm-objcopy] - Report "no zlib available" error properly when --compress-debug-sections is used..

My reason to fix it was that I couldn't reproduce an error reported in https://bugs.llvm.org/show_bug.cgi?id=40885 on windows (with zlib off).

Yes, that's how I discovered the bug this fixes actually! I just didn't have time to dig into it and fix it, so thanks. BTW, you'll definitely need zlib in order to reproduce https://bugs.llvm.org/show_bug.cgi?id=40885.

Tue, Mar 5, 3:03 AM · Restricted Project
jhenderson accepted D58909: [llvm-objcopy] - Report "no zlib available" error properly when --compress-debug-sections is used..

Okay, LGTM. I just verified that it works locally, when it didn't before.

Tue, Mar 5, 2:21 AM · Restricted Project
jhenderson added inline comments to D58908: [llvm-objcopy] - SImplify `isCompressable` and fix the issue relative..
Tue, Mar 5, 2:06 AM · Restricted Project
jhenderson added a comment to D58909: [llvm-objcopy] - Report "no zlib available" error properly when --compress-debug-sections is used..

Can you write a test that is UNSUPPORTED if zlib IS available?

I think we have such a test already. It is:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/llvm-objcopy/ELF/compress-debug-sections-invalid-format.test
(It does not do # REQUIRES: zlib because code report the Invalid or unsupported --compress-debug-sections format error before zlib::isAvailable() check.
What looks fine to me.)

That isn't the same test as I meant. That checks the error message at line 475, whereas I'm looking for a test for line 483. In other words, a valid compression format, but where zlib::isAvailable fails. It may not be possible of course.

Tue, Mar 5, 1:59 AM · Restricted Project